This is what governments are supposed to do. Manage a collective investment in things that make a country better for everyone, which cannot reasonably be managed by an individual or corporation, without the best interests of the many being outweighed by those of the few.
DARPA putting money into hackerspaces is such a beautiful idea that it made me smile all morning. Investing in ad hoc groups of enthusiasts to solve problems, and teach each other? That is what is going to close the STEM (science, tech, engineering, math) gap that the west is developing vs other parts of the world.
Sadly, a long trend of corruption makes people distrust government funding for anything. Which is a sign of how much needs to be changed in our governments.