GPS was a military project. Now we use it for everything from finding grandma's house to locating lost hikers.
The tech behind spy satellites is now used to monitor farming fields, increasing crop yields and reducing food costs. The same tech is used in telescopes like Hubble, teaching us so much about the universe and how nature works.
Most of the science on the ISS is impossible to do on Earth. We're learning a lot about human health especially (https://en.wikipedia.org/wiki/Category:International_Space_S...).
And it's not like the money gets burned or sent into space with the satellites. It's spent here on earth. A $1B contract with SpaceX doesn't just go into Elon's pocket and then he magics up a rocket. SpaceX employs thousands of people.
And space is a tiny fraction of the spending of all governments on the planet. Cut the military budget of the US by 10% and you could feed every hungry child, have a proper health care system, pay to reform the police system. Cut the budget spent on space, you wouldn't put a dent in those problems and you'd lose out on all the benefits we get.
GPS and the Internet were both invented by military, so I get that point... But that was a different time, there were different kinds of people in charge and people had more principles. When was the last innovation from the military which served the public interest?
One of the more recent massive success stories is KeyHole, which became Google Maps. It was originally funded by In-Q-Tel, the CIA's venture capital arm.