Earlier quoted context omitted.
I think he's probably optimizing for both. Don't hate the player, hate the game.
I don’t see how a charity can be simultaneously optimized for benefiting its founder and also benefiting people other than its founder. Different goals, different choices. Unless you’re suggesting that Musk is such an egomaniac that he thinks the best thing a charity can do is help him personally?
Easy to see how a charity could line up with what Musk is interested in and/or his companies are doing.
Advancement of space travel, advancing rocket science, reducing rocket launch cost for government, communications connectivity for people, electric vehicles and batteries, self-driving cars, reducing government costs for tunnels and transport infrastructure, relief for conservatives who were distressed about being banned from Twitter, advancing the Gospel of Musk, etc.
EDIT: http://www.muskfoundation.org/ yep, looks about right.