Same thing with SpaceX not being about going to Mars. It's about making money too!
The going to Mars/ good for env stories are to get some public goodwill behind them from a certain crowd.
If NASA offered contracts exploring the ocean depths then Elon Musk would be sinking Tesla's in submersibles.
Of there was an untapped market in deep sea, it might have been tapped by him as well. But judging from the oil+gas exploration there I think that's not quite as untapped (pun maybe intended).
I'm not against the government creating new markets like this, NASA has been doing it for a long time.
If profit really weren't Elon's primary objective, he would have started charities, co-ops or at least B Corporations (ignoring that those are basically a scam)
If someone isn't in it for the money, that doesn't therefore mean they're trying to be just generally 'charitable'. Elon clearly wants to be known for facilitating in bringing humanity to the next step (or steps) of its technological future. Pretty much every venture he's done (electric cars, mars colonization, high-speed people movers, chips in brains) have been towards that goal.
There aren't charities he can donate to that would do these things, or if there are, they aren't moving as fast as he has been by tackling it himself.
Probably at best he could donate to cure some disease like Bill Gates is doing, which, while worthwhile and great, is clearly not something Elon cares about all that much (especially with his kind of shitty views about the Coronavirus pandemic, which I'm sure is mainly because it did its best to put the brakes on all of his ventures).
If Elon wants to change the world there are many options at his disposal other than buying the title "founder" of a for-profit electric company he didn't found
If he starts a charity, it's not generating new income so he has to rely on only his own and external donations. It may be enough, with how much he is worth currently, but why not take all the free funny money from investors in the stock market while we're at it?
I'm not actually arguing that he's a charitable human being, I'm arguing he's motivated to progress humanity in a technological way (which could have charitable side effects). And either he's the head of a business making that change, or he's funding other companies to be that business, so why not have direct control over it?