It's sort of astonishing to call it perpetual motion, when there really is an enormous multiplier at play. Money is not like mass: it can be created and destroyed; one of the primary roles of central banks is to create and destroy money to stabilize the economy.

Moreover, 'zizee is talking about something even more powerful. Space programs can act as huge multipliers on an economy. A country's economy is sort of a closed system, but that doesn't mean it can't undergo a multitude of phase changes that free up resources after spending money (even waste fully). Astonishing amounts of infrastructure is needed to support a space program, and a lot of it translates to other industries well. Just as a plant opening in a town may only directly employ a few hundred people, the support infrastructure - from welding shops to hardware suppliers to diners - is huge. Many thousands will be affected by those few hundred workers.

A US example: a plant engineer goes out to lunch. Their salary has already been taxed through withheld federal payroll taxes. At the diner, a 10 buck blue plate special is ordered, and a tip left. The town has a tax on prepared dishes, which is added, and the wait staff will have their wages (and possibly tips) taxed - a wage which some portion of which is was from the lunch. That lunch also goes to support a local farmers group and a national cattle company. And so on; the piece gets smaller and smaller as it splits and redistributes through the local and national economy (and these days likely global). At some point, that money is spent.

But there's no zero sum here. Hopefully, at every step of the redistribution, at every split, some wealth was generated. A service was performed where it wouldn't have without some money. Some taxes were collected and put back into infrastructure which added a new light to the two-lane Main Street making it safer and faster for trucks to go through, a state grant to the local colleges, and a federal appropriation bill that supports local green farmer groups. The light makes more business possible on the far end of town, and drives down the plant's shipping costs a little, leading to a buck fifty more on the quarterly bonus the laborer a got later that year. And I'm leaving the other two alone, as this gets out of hand fast. At some positive, non-zero rate, the economy very slightly accelerated.

A decade later, two more plants from other industries are opening. The town is small, but has been friendly to industry. The first plant has some skilled labor that is sorely needed for these plants, and a few leave for slightly higher wages. The old plant has an established reputation in the town, and eagerly hires some replacement twenty-something's, both for their cheaper cost to stay competitive and to train fresh minds (to correct what they learned from the first ten years of mistakes).

Those skilled workers who got hired for a little more money, just for their exposure to the industry and a few skills picked up applicable to the new plants? They are going to get a blue plate special, but this time with pie. That could yield an extra buck or two to the diner - a buck or two that would never have been bought if the workers didn't get the raise from the minor skills gained from the plant that hired a couple hundred people ten years ago.

Space is like that, but with the accelerator to the floor. Technology from space programs infuse industry across the board, and require skilled labor from every level: from rocket scientist engineers to the guy painstakingly polishing the special steel alloys in a clean room. And they're all becoming slowly more valuable as a result, and they'll earn higher wages, eventually. And that money, gained from that wealth in knowledge and skill, generates more wealth - and eventually money.

Keep that up for long enough, and you've got enough skilled people to keep an economy running indefinitely. Which I suppose detracts from my initial statement: it sorta is a perpetual motion machine. Bootstrap it well, and the system will, in fact, continue to grow. Economies are big, governments are big, and they're only closed systems if you insist on zooming in and putting dotted lines around only money flow.

Amendment: contrast this perhaps with the Superconducting Super Collider. A boondoggle of there ever was one, many thousands were hired for no appreciable result, many hundreds of millions of dollars were literally sunk into a super high tech [partial] ring in the ground, and millions in equipment was manufactured and purchased. And yet, foolish as it turned out to be, it still payed many thousands a wage for a few years, fueling nearby industries with displaced highly skilled laborers now without a job, and apparently local wineries can make use of the stupefyingly expensive tunnels. All the while, the boondoggle pumped money into the hands of people who spent it, who then went on to spend what they received, all of which is getting taxed over and over. Some of that money absolutely had to end back up with the government, just as some of the air you breath was likely also breathed by any arbitrary other human. Even wasteful, such an endeavor was at least useful for it's multiplier effect. (Personally I would have loved to work on the SSC and think it was a shame to kill it, but holy geez it cost a lot - but at least can learn from a cool tech who tested components in an EM anechoic chamber, which inspired a trick I've used to help make windows slightly more reliably energy efficient. Side effects.)