A smart species doesn't bet on one planet staying around. If we want to persist, we need to expand on the long term. Right now a single large meteor strike or a number of other catastrophic events could wipe us out because we're only on earth. Expanding to other planets in the solar system, and at some point hopefully beyond, is necessary to keep our species afloat.
Yes that costs resources, but as far as I'm aware not nearly enough to significantly impact climate change on its own. Also, as a much as I hate Musk, SpaceX has achieved some wonderful things. They have bright people there, and the money invested has achieved real progress in space travel. Reusing parts of their rockets and overall just improving the tech. I'd rather see someone having a space race, even if it's billionaires, as long as it improves the knowledge and technology for our species.