You only missed the part that SpaceX was founded several years prior and that Falcon 1 was developed with his own money and solely private risk.
Nasa only contracted SpaceX because of that AND because SpaceX saves them billions of dollars from otherwise inefficient suppliers.
But that's not relevant.