The thing with post apocalyptic fiction is that, by its very nature, it's depressing as all hell. The whole world has ended, lives have been torn asunder, and depending on the scenario there could be zombies or radiation or aliens or plagues to deal with for the foreseeable future. You're generally in for a bleak time when you get into a post apocalyptic story. What kind of people actively seek out stories that are inherently dark, dreary, dismal and depressing? Well... that's a discussion for another day.
The thing is though, all the best post apocalyptic stories know how to balance this bleak narrative with a spark of hope. Because as much as the world could possibly suck after it's ended, there has to be the possibility of things getting better one day. You can drag the audience through the shit and mud, and even kill their favorite characters, but at the very end there has to at least be the possibility that things will get better... someday.
In The Road, the Man and The Boy face months of hardship as they journey south, trying to find a warmer climate to survive in. They come across cannibals, roaming bands of marauders and (in the book) they even come across a woman who gives birth to a child and then cooks it straight away... their journey is harrowing, to say the least. The Man is clearly sick, and after a short and pointless skirmish with some other travelers he is injured and after a while he can't travel any further. The Man dies, and just when it looks like the Boy will be left on his own in this bleakest of worlds - a whole family approaches him, and asks him to join them.
In The Book of Eli, Eli has traveled across the irradiated ruins of the United States, guided by faith alone. He's been beaten and shot, he's dying, but with the help of Solara he's able to finally reach his destination. It looks like it's all been for naught, he lost what he was meant to bring with him, but it turns out he's carried it for so long that he knows it's every facet by heart. He dies, having finally completed his mission. And Solara, changed by her journey with Eli, sets out to return home, ready to be the change she's always wanted in the world.
In 28 Days Later, Jim woke up from a coma to find a world overrun with rage zombies (yeah, The Walking Dead totally stole the whole coma intro idea from 28 Days Later.) His family is dead, he's made friends and lost them and he's seen, and become, the worst that humanity has to offer. In an attempt to save the last of his friends, he's gravely wounded and it looks like he might die. In the last scene however, we see them all living peacefully together in the countryside and as a plane flies overhead we see Jim smile, despite it all.
Finally, we come to The Divide. New York gets nuked and a bunch of people cram in to a fallout shelter under an apartment building. What follows is 122 minutes of the bleakest shit you've ever seen. The characters are trapped down in that bunker and they turn into monsters, they kill and rape one another, and as a few of them get radiation poising they all start physically decaying as well. Eventually the protagonist manages to escape the bunker into the outside world, and just when you think things might start to look better.
We see the gray and crumbling ruins of the New York cityscape, with not another living thing in sight. She's finally escaped that little hell beneath the ground, only to discover that there's absolutely nothing above the surface... and then the film just ends. We get this defeated look upon her face and then the credits start rolling. It's absolutely crushing. I clearly love post apocalyptic fiction and I don't mind watching a movie again every few years, but I seriously doubt I have the emotional stamina to get through The Divide a second time. It's just so goddamn draining!
And that's the thing, there has to be some kind of release. You can't put audience through the painful and oftentimes uncomfortable experience of a depressing story without at least giving them some kind of emotional pay off at the end. If the characters have managed to get all the way past the flesh eating corpses, past the mutated dogs, through the quagmire of radiation and beyond the death robots, then they have to find some sort of oasis that makes the whole fucking journey worth it. Not only for themselves, but for the audience as well.
Even if they die at the end, they have to die for a purpose that has meaning. Because at the end of the story, the journey has to have been worth it.