Money is a classic example of a fungible resource. That means you don't particularly care which twenty dollar bill is yours, or even if you've got two tens instead. Houses are not fungible: you can't just arbitrarily trade two houses and expect both participants to be happy. If I lend someone five dollars, I don't expect them to retrieve that particular bill when they pay me back. If I lend them "Catcher in the Rye", though, I don't expect to be returned "Alice in Wonderland" or even another, heavily highlighted copy.
This is all nice, and helps the economy run smoothly. But the fungible nature of money can make thinking about money deceptive. Five dollars is five dollars, but five dollars spent in one place is not equivalent to five dollars spent elsewhere. The money is fungible, the act of spending money is not.
Think about a decision to send a spacecraft to the moon, at a cost of perhaps a billion dollars. At that price, we could probably buy every human in the world a serving of rice for a week. But does that mean the spacecraft took 50 billion meals of rice away from the world? No, of course not. Rice production and spacecraft production are such disparate worlds that money spent in one shouldn't really affect the other very significantly.
What did spending the billion dollars on the spacecraft cause? Well, oil, steel and electronic elements were probably the biggest physical expenditures. Thus a little less steel might exist for sale on the market. That in turn may have inched its price up just a fraction, and perhaps a few people in the long run ended up holding off buying a new car. Electricity was certainly used up heating and lighting factories and offices, powering computers where the design occurred. Because electricity is also fungible it's hard to point to one particular thing the spacecraft effort impacted. But perhaps higher energy costs ultimately caused a handful of families to keep the thermostat a little lower that winter. Resources like electricity and steel have limited availability, so in one sense choosing to use them for one task removes their availability for another task. But you can't convert rice into steel to meet one need with another.
Which is all a simplification, of course. Oil use could increase demand for alternative fuel sources like ethanol which could use up corn, which could increase demand for rice. Or the electricity used by the offices might just come out of excess capacity they had just in case, increasing efficiency in the system and thus being 'free'.
When you've got a billion dollar project, the priciest part is usually the humans. Thus the investment in a spacecraft is less significant in terms of allocation of steel then it is in allocation of minds. The money goes to scientists to design and build this craft. Perhaps it'll improve employment rates a tiny bit, but it seems likely most of the people involved in building a spacecraft could find other work. So the projects biggest impact might be taking minds away from other tasks.
One line of thinking holds that even though none of the scientists would have been rice farmers, they might have been, say, a manager at an industrial factory. So now a line worker becomes the manager, opening up a position a farmer's son fills instead of working the farm. But even if there is some truth to this, every subsequent link lessens the impact.
People are the ultimate in non-fungible resources. We're all different. Perhaps one of the scientists involved in the spacecraft effort would have worked designing cars instead, pushing fuel efficiency up a tiny notch. Or maybe another would have been a manager, and done a poor job at it, causing rippling effects in stock prices and resource usage. The existence of a billion dollars worth of work for aerospace engineers might influence the next generation in college, producing more in that field and less in, say, astronomy. That might influence very gently our understanding of the cosmos. It might be an inefficient allocation if fewer spaceships are build in the next generation.
And we could do the same thing for buying a fifty billion servings worth of rice. How does land usage change? Nitrogen usage? Transportation of the rice? Who do you need to farm and distribute the rice, and what would they have done otherwise? Although each project costs $1 billion dollars, they aren't fungible in how they impact the world.
It's easy to just visualize the economy as a ledger. A dollar is spent here, fifty dollars of oil are burnt there. Because dollars are such an easy abstraction to think about, it becomes tempting to equate things with the same cost. A second car or a vacation can be equivalent decisions in terms of cost, but they can ripple through the economy in very different ways.
You'll never predict all the ways an individual economic action will ripple through time. But it is important to keep in mind when thinking about money. People often complain about spending money on NASA when people are hungry in the world. But they're aren't trivially connected. Cutting NASA doesn't end world hunger. Similarly, the recent financial crisis has revealed that a company's bottom line isn't necessarily proportional to it's positive impact on the world. Money is an invaluable abstraction, but it's good to sometimes take a step back and think about the millions of moving parts involved when you buy a pack of gum from the store.