That's exactly why it got its budget in the first place: to show up the Russians (who had shown up the Americans by launching first 'Sputnik' and then Gagarin), not necessarily to do something useful in space. But no matter how they got their budget, I'm happy they did.
Space X is a bad, fan boy example. my life is greatly improved by the internet, by ubiquitous electricity, satellite communications, etc. the current form of many of these things was driven by a type of capitalism that is inseparable from inequality
If NASA had the budget of the 1960s today we would be way ahead of what Space X is doing now.
And yeah, even without that I’d trade Space X for more global equality in a second.