The Torah presents different funding models for two different Israelite national projects. I shall suggest a pair of reasons for the funding difference, and then use these two reasons to shed light on how contemporary national projects should be funded.
After gaining approval from God to build the tabernacle (portable desert sanctuary), Moses instructs the Israelites:
Take from among you gifts to the Lord; everyone whose heart so moves him shall bring them." (Ex 35:5. see also Ex 35:29)
The construction of the tabernacle is funded by voluntary individual contributions, i.e., private charity. Moses does not tell everyone to ante up. Instead, he offers each person the opportunity to contribute.
Feeding the Needy
The Torah is famously concerned with the well-being of the disadvantaged: widows, orphans, strangers, disabled and the poor. One manifestation of this concern is the following commandment.
When you reap the harvest of your land, you shall not reap all the way to the edges of your field or gather the gleanings of your harvest. You shall not pick your vineyard bare, or gather the fallen fruit of your vineyard; you shall leave them for the poor and the stranger. (Lev 19:9-10)
There is nothing optional about this social safety net for the needy; it is not charity.
Leviticus does not leave it up to farmers to determine whether, or how much to contribute. This is a required transfer of food from the haves to the have-nots. Contribution is compulsory (with shirkers presumably punished by God). The contemporary analog is the SNAP program (the Food Stamp program), funded by taxation.
Why Fund These Two Projects in Different Ways?
The answer is that these projects differ in two crucial respects: who benefits, and what is essential.
Before God gives the go-ahead to build the tabernacle, Moses and God have already been meeting regularly in the Tent of Meeting outside of the Israelite camp (Ex 33:8). God has not abandoned the Israelites after the Golden Calf debacle. Indeed, before the go-ahead, God has already promised to get the Israelites to the Promised Land and to defeat their enemies (Ex 33:1-3). So what do the Israelites actually gain from building the tabernacle and having God dwell within it?
The Israelites get to dwell physically closer to God, but that is no real benefit. Some may feel pride in the workmanship of the tabernacle. Others may be relieved of shame when God and Moses no longer meet in a makeshift structure. But these are relatively minor things. Divine forgiveness and reconciliation with the Israelites are clearly major benefits, but they are only symbolized by God's willingness to dwell in the tabernacle. The fact that the donation of building materials is completely voluntary makes each donation a personal commitment, and the construction of the tabernacle a national commitment to God. Commitment is a real benefit, but it arises from the donation, not the building. Overall, the tabernacle provides no significant benefit to the Israelites.
By contrast, the policy of feeding the needy benefits every Israelite. Obviously, the poor benefit by gaining food. The rich benefit too, although in a different way. Wealth is arguably quite precarious in the ancient world. Rich people can quickly become poor (as the later book of Job emphasizes). Thus rich people gain security from a policy ensuring that poor people don't starve because rich people are potentially poor.
Some things are necessary for bodily survival (e.g., eating, self-defense); others are essential for the survival of one's self-identity. For example, suppose Jane defines herself as an artist. But she paints a large, kitschy cupid into the center of her masterpiece in order to sell the painting to a tasteless customer. By throwing away her artistic integrity, she has destroyed her self-identity. People who give up what is essential to them commit figurative suicide; they are replaced by someone worse. They are born again, but not in a good way.
Communities have essential projects, too. If they do not follow through on their essential projects, they lose their integrity, and functionally cease to exist. For example, if the USA ceases to be a democracy, it will have abandoned its essence and become a different country.
Now building the tabernacle is not an essential project for the Israelites. It does not define them as a nation. Instead, the Israelites are defined as a nation by their experience as an oppressed people in Egypt, their God-abetted escape, and their covenant with God. Following the commandments is the core of the covenant. Thus, following the commandment to feed the needy is an essential project for the Israelites.
Funding Beneficial, Essential Projects
Some people now think that feeding the needy should not be an essential project for the USA. But let's not argue about that. Instead, let's consider how beneficial, essential projects -- whatever they are -- should be funded.
Everyone agrees that people should not be forced to pay for inessential projects which benefit no one. Only those who want to contribute should do so. The right funding policy is charity.
Most people also agrees that if something benefits everyone and is an essential project for the nation, then everyone who can contribute, should contribute, according to some fair formula. People who do not contribute are freeloaders. Even people who do contribute are freeloaders, if they pay less than their fair share.
People disagree about which formulas are fair. Some suggest that, "the more one has, the more one should contribute." Others say that, "the more one benefits from society, the more one should contribute to society." Yet others offer other formulas.
But one thing is clear: When dealing with essentials, the formula, "the more one wants to contribute, the more one should contribute," is not a fair formula for funding beneficial, essential projects. Indeed, it is hard to imagine a worse formula. It is a recipe for maximizing and institutionalizing freeloading, not among recipients, but rather among potential donors. Given the option, some people will opt to pay less than their fair share; the rest of us will have to pay more.
This unfair, freeloader-encouraging formula is exactly what it means to leave society's beneficial, essential projects to charity. The only hope for a fair formula is to require contributions. That is why the Torah funds the safety net for the needy by required contributions.
Similarly, whatever you think the beneficial, essentials are (e.g., medical research, feeding the needy, public education, fostering small businesses, environmental conservation), you should make sure that these projects are fully funded by (reasonably fair) taxes rather than by charity.