NASA does a lot more than SpaceX. What do you think those two entities do?
Certainly doesn't help that Congress wants to shove 11 billion down NASA's throat mostly against their will [0] while also trying to defund missions that SpaceX would never do, like investigating climate change, or advancing science that isn't profitable to themselves.