Religion teaches us that we do not have ultimate responsibility for what happens to our planet. If a deadly meteor is heading for us, we can expect religious people to think that God will save us, or that God wants it to hit us. Either way, not much need to figure out how to fix the problem ourselves.
Religious people can say “the important thing is to be righteous and do our duty, and leave the results to God.” Of course, if your goal is to do your duty, rather than to make the world the way it needs to be to survive, then you’ll probably fail at that second one. At the very least, since you’ve passed the buck on to God, you have less motivation to save the world from any catastrophe that may befall it.
In short, if the end of the world threatens us, religion teaches us to trust something else to save us, rather than to save ourselves. If saving the world requires being “immoral,” religion teaches us to be “moral” anyway, and let the world perish for it, for God will save it if he really wants it to be saved.
I rather prefer the exchange between Aang and Yangchen from Avatar: The Last Airbender:
Yangchen: “Avatar Aang, I know that you are a gentle spirit. And the monks have taught you well. But this isn’t about you. This is about the world.”
Aang: “But the monks taught me I had to detach myself from the world so my spirit could be free!”
Yangchen: “…Here is my wisdom for you: selfless duty calls for you to sacrifice your own spiritual needs, and do whatever it takes to protect the world.”