The idea of government is that it lets us do things for the collective good what we would not do for ourselves individually. The US government, for all its faults, does sometimes follow that idea. It's not much different from maintaining the highway system. True, it covers the world, not just the US, but the nature of satellite navigation means that it wouldn't be any cheaper or easier to restrict the system to only work in the US, so why bother?
It slowed the need for other countries to put their own up.
The satellites were not a secret
Their encryption scheme was probably already cracked, so might as well open it anyways.
This is also why the US said they’d shoot down the EU system unless the EU would construct it in a way that the US could easily jam it. Now it has that backdoor in it. We shouldn’t have let them extort us like that.
Honestly, I struggle to find any reasoning on why GPS is shared with the world beyond "Korean Air Lines 007 crashed, so Pres. Reagan made GPS free to (save the world|gain political capital). Later we removed the civilian precision restriction because that's cheaper than maintaining it", which I find a bit weak. Maybe somebody can enlighten me