Without NASA (end JAXA and ESA and the Soviet space program) literally inventing new materials and fundamentally novel technologies these companies would not be able to accomplish what they are doing.
In turn, NASA, ESA, and Soviets would not be able to do anything without Nazi rocket program. Oops, where do we go from here?
It's really strange to praise some actors for the incremental progress they made, but not others. And really, even Greeks did not invent most of the stuff traditionally ascribed to them.
On a more serious note, no one is trying to take away anything from NASA. They helped SpaceX a lot, and without that help nothing would have happened. Having said that, the same exact help was available to the legacy aerospace companies, and all they managed to do was to bolt Russian engines onto their rockets. NASA doesn't have it's own production capacity, it *always* relied on the private sector to build stuff. SpaceX is a better partner to NASA than anyone else, plain and simple. It's not SpaceX vs NASA, it's SpaceX vs ULA+Roskosmos.
That's precisely why I said "(who themselves [those nasa, etc. engineers] stand on the shoulders of other giants.. all the way down)".
Moreover, I'm not trying to praise those NASA folks and discredit the folks at SpaceX. I'm simply pointing out they are participating in the arena of space exploration in two different ways.
NASA (et al.) participates by doing a shit-ton of fundamental research to accomplish tasks which never had/have no hope of commercial success in any timeframe that would sustain a private company. It's only an exceptionally rare situation where fundamental research has anything but long to very long term ROI. The fact that "private companies" did the production is irrelevant, it was NASA funding that made it possible.
SpaceX (et al.) participates by taking the results of that fundamental research and building a commercial enterprise out of it. They may be doing some limited amount of fundamental R&D, but 99.9% of what they are doing is refining existing technology to make something accomplished by others more efficient. This is highly valuable, but not the same as what NASA does.
Importantly, these two things are complementary, not exclusionary. NASA shouldn't be in the business of routine space flight tasks like putting satellites in orbit or making a delivery to the ISS; government is inefficient at that kind of thing. Likewise, a private company like SpaceX that needs to make a profit is really, really bad at fundamental R&D but far superior to government at commercializing technologies.
This is a pretty typical scenario, especially in arenas of bleeding edge tech. NASA does a ton of fundamental research on terrestrial aviation which eventually makes its way into commercialized product at Boeing, etc.
It remains to be seen if the Bezos's or Branson's of the world will participate in any meaningful way or if they were remain side shows.