So are companies (Itanium, Windows Mobile, etc.) but what governments do well is funding the competitive baseline needed for big advances. We live in an age of wonders invented based on American research investment in the mid-20th century, and that worked because the government did not try to pick winners but invested in good work by qualified people (everything NIH, NAF, etc. do by competitive grants) or by promising to pay for capabilities not yet available (a lot of NASA and military stuff).
Just like it doesn’t work to try an ecosystem based on one species, a society has to blend government and private spending. They work on different incentives and timeframes, and both have pitfalls that the other might handle better.
But what governments often can do, is break local optimums clustering around the quarter economy and take moonshot chances and find paths otherwise never taken. Hopefully one of these paths are great.
The difficult thing becomes deciding when to pull the plug. Is ITER a good thing or not? (Results wise, it is, but for the money? Who can tell really.)
Presumably the tax payers would have procured something themselves, if you'd have left the money into their own pockets.
See how IBM was on the path to inventing electronic computers for business and accounting, but got pre-empted by the militaries' needs and procurement.
In the counterfactual if there hadn't been a war going on, presumably businesses would have had even more needs for international business machines.
The counterfactual is that the investment required was beyond what even IBM could consider to spend at the time, to the point that even with "guaranteed buyer" in form of military procurement there was strong opposition towards going into "niche computer business".
Military/government procurement provided the demand for which private entities could provide, money and other resources at level that private market never managed.
Without large injection of money supply there's not much extra dollar to chase and safe investments sound like better bets.
The incentive was US Navy feeling embarassed at how "country that invented the airplane" had shitty showing in aviation in 1914, and ultimately deciding to invest heavily in area now called Silicon Valley.
This provided demand for products and services that simply was not there in private form, allowing way riskier investments - all the way to 1980s Silicon Valley was mostly riding downstream of military procurement (Can't source the quote right now, but Sun microsystems be-or-not-be was landing a contract for NSA for Unix workstations - because NSA could frontload an order for few hundred if not thousands workstations)