But... SpaceX is a corporation, so the main point is in fact making money.
Elon Musk seems more focused on affecting meaningful change and driving technology forward. He's using corporations as a vehicle to do that and making money is an incidental side-effect.
If profit was his primary motive, there would have been many other ways to invest his fortune from PayPal which entailed far lower risk and potentially significant gain.