Of the multitude of reasons SpaceX can operate more cheaply I can think of, the biggies are:
-NASA is a Government agency, beholden to the congress and the congress loves its pork, so only certain big-name contractors get NASA contracts.
-SpaceX is not a federal agency and doesn't have to play by the same onerous, costly sets of rules as a federal agency (i.e purchasing requirements, safety requirements, etc.)
-SpaceX has negotiated some sweet deals to use existing government facilities already paid for by NASA (taxpayers).
-SpaceX has received a lot of seed money from NASA.
There's more, but you get the idea. I'm not here to take away from what SpaceX are trying to accomplish, but they certainly have an advantage over a bloated government bureaucracy.