> Because it's cheaper and more frequent.
The thing is that you can't put a price tag on national security. For example Ukraine got F16s. Good plane. However after a spat between Zelensky a Trump, Ukrainian F16 got no new updates to their jammers, which temporarily degraded the plane performance and Ukrainians needed to pull them out of frontlines.
Sometimes it is just better to fly on a plane which is not the top performer, but which you can control and manufacture or which a neighbor with same geopolitical problems like you can control and manufacture - i.e. Swedish SAAB JAS39
Same with space launches. Furthermore SpaceX is US company, so US government will want to know everything about the payload, probably down to the schematics and software, which is a big no-no for national security, but even for IP protection - what is stopping US government to supplying your IP to your US competitor? Nothing.
JAS 39 Gripen is using a US engine with export controls, so they could stop that too if they wanted to... https://en.defence-ua.com/news/gripen_still_relies_on_us_eng...
Ukraine has no money. Of course cost matters
> you can't put a price tag on national security
Of course you can. It costs more, but a finite amount more.
Your argument is it'sz worth paying that cost. I agree. But those cases are limited, both by the customer base and that additional cost.
SpaceX is not launching non-U.S. national security payloads. That's not great for American power. But it's a rounding error for a launch provider putting mass in orbit over three times a week [1].
[1] https://www.space.com/space-exploration/launches-spacecraft/...