We have the facilities to undue much of the damage we have done to the earth, unfortunately though ecologically sound to do so, it is not fiscally profitable to do so, and so in the warped capitalist ethics of todays world, is not worth doing.
But we don't.
True. However, a few billionaires who are funding space flights as a business are leading people to believe we are capable of terraforming other worlds.
Rather than clean up the mess of this world, they think we, or rather THEY, can just pick up and go elsewhere.