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.