There are a lot of cinematic crimes committed in the name of ending movies on a feel-good note. The twists range from technologically advanced spacecraft having one major weakness, to bad guys being swayed to the side of good after a brief pep-talk from a hero. These cheap ploys frustrate audiences, but they are in service of a sound principle: Almost no fictional story should have an unhappy ending. Especially in fantasy and scifi.
We all cringe when we see treacly human-interest items on the news. A cat fell out of a twentieth story office building balcony the other day. It fell onto a crowded intersection covered with glass. It fell right next to a gathering of six untamed pit bulls. And yet the cat caught an updraft at the end of its fall and landed gently. Traffic stopped because each side of the intersection was headed by a responsible driver. Remarkably, each of the cats paws landed in a spot free of glass, and the pit bulls cleared away extra glass with their noses to make sure the feline was able to make it to the sidewalk unharmed. By the grace of Anubis, The Countess Flufferkinsky is going to be okay. Now to commercial.
But imagine seeing a story like this: A cat fell out of a high window. It died. People were picking cat entrails out of their hair all day. Cat lovers would be horrified. Cat haters would be secretly thrilled. But everyone would have the same question: Why did this story make the news? It's not of great significance to the world, and it doesn't contain any surprising or remarkable information.
Fiction is obviously not of any factual importance to the world, either. If there actually were an intergalactic civil war going on around us, or mysterious disappearances that happen as soon as people are out of the light, any depressing documentary on the subject would be justified. In the real world, sympathetic people with justified causes die all the time. That's the way it works.
Since we're not actually threatened by powers in a galaxy a long time ago and far far away, fictional stories are ultimately human interest stories. They pull people in on a personal level. The main, and sometimes only, reason to tell these stories is the idea that they're remarkable, they have an unexpected result. Like our cat who avoided the glass.
Let's consider some oft-repeated stories.
A young girl is possessed by the devil. The only person who can save her is a priest/preacher/cop/psychiatrist who is having a crisis of faith. The two go head to head for the soul of this girl and the fate of the world - and the devil crushes the humans like a steam roller rolling over a garden slug because he's the devil and they're two humans.
A ragtag group of rebels goes up against a repressive totalitarian regime. The technology of this regime is incredible, and they are everywhere. It looks bleak, almost impossible. Then the group pulls together, and with a combination of luck and skill - manages to make it long enough to be caught, tried, and publicly executed.
A young woman is being hunted by a mysterious force. That force creeps through the shadows, stalking her, but retreating whenever another person is near, making everyone think she's crazy. She can't even imagine how to fight this inexplicable enemy - which is why she gets killed immediately.
They're not just bummers - they're predictable bummers.
Books, movies, and other fictional stories do serve a number of important functions in society, and yes, occasionally there are reasons to examine the human psyche or the societal machinery in an unbearably depressing way. When it comes to all the big mainstays of fiction, horror, adventure, epic quests, sports, battles, it's always the little guy going up against impossible odds. It's always an underdog story. And the only reason to tell an underdog story is if the underdog wins. Don't tell me that I'm going to get eaten by a powerful monster, crushed by a government regime, or sent straight to hell by the devil. I'd believe that anyway. Tell me a better story.