At this juncture, there are several potential endings poised. Shyalaman chooses the worst one.
In one scenario, no sacrifice is made, but the world remains. The cultists are proven wrong, and the online death machine claimed four deluded souls. In another scenario, no sacrifice is made and Andrew and Eric flee, only to find the world ends anyway. Having proven their moral rightness over an unjust Higher Power, however, they happily wander the scorched Earth in peace. In a third scenario, a sacrifice is made, but the world ends nevertheless. The events in the cabin, in that case, would be the final panicked moments of waning humanity.
A final scenario, however, is the one the filmmakers chose. The cultists die, instigating the apocalypse. Planes fall from the sky and lightning strikes increase. Eric pleads with Andrew to kill him and stop all this. Think of Wen and the future she would have with civilization intact. Andrew already argued that the continued survival of the world may not be worth it — a nihilistic theme to be sure, but a theme nonetheless — but Eric feels the world is worth saving. Andrew, in a moment of sadness and resolve, murders his own husband. The sacrifice immediately undoes the world’s disasters, and the world persists.
Andrew looks through the cultists’ belongings and finds they were exactly who they said they were. They were, Shyamalan seems to say, honest, ordinary people.
One can’t help leaving the theater deeply hurt by Shyamalan’s message. Yes, the world is alive, and thank goodness the bigot was right. And that a gay man is dead. The world can only continue to turn so long as an unacknowledged and persecuted queer couple is forced to kill and die for its benefit.