SpaceX received very little in 'funding' from the government. However they sold extensive services to the government, primarily by offering the best value on competitive contracts.
Yes, I'm sorry, funding is not the right term. They received $20bn in federal contracts. And they do fantastic work. My point is, the government is certainly aware that spacex does a great job and delivers. It's not a competition between NASA and spacex.