Most soldiers are in the US.
I've known a lot of people who raised their families at decent wages on DOD civilian jobs. Designing satellites, working on drones. And a lot of people who benefitted from being in the military. Machinist training, mechanics training. Tuition/fees at college.
If we fire 100k soldiers and 50k defense contractors, we have 150k unemployed people. Spending is spending, except spending on middle-class income levels provides better jobs than spending on agricultural produce and basic necessities.
A lot of "cop toy" research becomes civilian technology. Civilian technology that politicians probably wouldn't want to fund because it's not sexy and they don't see a point in it. "When am I going to use this?" for very-short-term thinkers is an insidious question. They understand a Big Mac in front of their faces. Tell them to invest the money and get three Big Macs next year and their answer is, "Wha?"
Many of the "military" bases are associated with embassies and are small. Others are satellite and monitoring stations. It's hard to track a satellite once it's set unless you have enough bases that the satellites never set. This includes monitoring GPS and telecom satellites. It's also a safety issue, since they keep real-time telemetry on thousands of pieces of space junk to protect the ISS and mission-critical satellites.
Some overseas missions are probably unnecessary. But even thick-shelled tortoises find that predators can evolve teeth sharp enough and methods clever enough to get to the meat.