Do you really think the government created and funded the NASA, the DARPA, the Manhattan Project and the NSA for the love of science? (I certainly won't deny all the really cool side effects they created, though.)
I'm sure scientists and engineers would have discovered and created as many cool things if the money was spent on peaceful research projets instead of being confiscated by the government.