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 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 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.