For context, that's over twice the size of the Gates Foundation. You have to compare that to all other possible investments, including energy startups that could pay off a lot sooner.
Note that SpaceX is set up as a business, not a charity; Musk may talk a lot about Mars but that's not really where the money goes.