Isn't that because they could work outside many bureaucratic regulations and Musk's focus on the essential?
Disclaimer: I don't know much about how SpaceX or NASA's finances work. But I assumed that, due to their tighter coupling with a government, NASA has less leeway in their decisions of which technologies to research compared to SpaceX.