NASA paid SpaceX & OSC in advance to produce cost-effective vehicles that NASA then bought. Paying in advance to create new products like this is a standard commercial transaction, and it saved NASA a lot of money compared to buying what was already available, according to NASA.
Sounds like you don't want to fund space at all, but that's a different discussion.
It's not even unique. NASA didn't even build the F-5 rocket engines that sent men to the Moon; Rocketdyne did. That's the way government contracting has pretty much always worked. The government typically does a bunch of R&D work, and works with commercial companies to actually build things, especially in quantity.
Sounds like you don't want to fund space at all, but that's a different discussion.