Also, the free market would never have built a design like the space shuttle. Pushing very heavy wings and landing gear into space doesn't make sense and never did.
Musk figured out a far better way to make a reusable rocket. All it needs is a bit of extra fuel that is burned at the last second.
(Playing the Lunar Lander game in college, I soon realized that the minimum fuel burn to land it was to fall ballistically and go to full power as late as possible, hitting 0 fps just as one touched down.)
Where the 2nd space shuttle was the fuel tank, and it lands somewhere down range, and is then transported back to the launch center by barge.
I think it might be time to accept that in these cases its pretty often not the inherent efficiency of the free market - which can often be less efficient than alternatives - but the ineptitude of the US government and it's agencies as far as doing things efficiently.
There are US politicians and functionaries that admitted publicly that they made the government less efficient for ideological reasons to make the free market look better.
That doesn't mean it was profitable. The price could have been set for political reasons. Or it could have been set by the marginal cost of the launch, ignoring entirely the development cost that was written off when the USSR collapsed. Or it could have been enough to simply pay for the weight of the astronaut in a rocket that was going up anyway, like a hotel will sell rooms at a deep discount just to not lose as much money if it cannot otherwise. If communism produces goods and services cheaper than the free market, we'd be awash in Soviet goods.
The US government produces goods and services at "cheap" prices, but the losses are made up for by the taxpayer.
> which can often be less efficient than alternatives
I'd like to see a case of that.
Which we aren't, because they're undercut by Chinese goods...
Well, perhaps I should have tried living in those fantasy Soviet Unions some people on the internet love so much. Those must have been magnificent states!
That said, it is certain that the soviet system was suboptimal in a great many ways.
But, crucially to the fact at hands, 1960s' USSR produced better rockets to send people to the ISS, at a lower cost, than 2021's USA, so there something beyond the free market in this particular case.
Also, Falcon 9 wasn't the product of a government contract.
Source: another anecdotal evidence, my youth lived under the horror of communism.