The US still invests heavily in defense, which props up STEM. I agree it was nicer when the goal was space though.
But if you look at how much the US spends on military versus the scientific progress coming from the military (e.g. DARPA stuff), the yield is actually surprisingly low. At the very least we can probably agree that it's not a very efficient way to fund research.
https://golem.ph.utexas.edu/category/2020/12/the_lie_of_its_...
My pet theory: the MIC buys goodwill and scares academics to criticize the MIC.