You can also look at it from a different perspective:
The market is a much harsher master when it comes to fiscal accountability. Stuff doesn't get funded unless it's going to make money. Military spending is a magical well of infinite money with little accountability. You can think up any project you want and get money to do it so long as you say you're going to strap a gun on your robot, or that the decentralized communication network is really to help survive a nuke attack.
I used to work in bioinformatics and money from the typical funding sources was getting tight in the late 90s, early 00s. After 9/11, my department just recast every project as "terrorist bio-defense" and was financially refueled with defense money.