The writer has to decide whether the ending of a story will be happy, sad, or neither. Sad endings are the stuff of tragedy; everyone dies. Happy endings are for comedies; everyone gets married. Sex and death–that’s all that’s important, really. We have permutations of the happy/sad outcomes; in modern work, maybe only one person dies, or maybe the hero doesn’t get married, but triumphs over evil. The mystery is story is like this. The detective/cop (forces of order) catch the murderer (force of disorder), and thereby mend the tear in the fabric of society that the murderer created. A happy ending, except that one or more people did end up dead.
In another category entirely is the unresolved, or “nowhere” ending, where most of what goes on in the narrative is left partially or completely unresolved.
Some people only want happy endings. Life is depressing enough without seeking more unhappiness in our reading and viewing. On the other hand, there is public appetite for the tear-jerker. The sad ending can bring catharsis, and a different sort of triumph–facing loss with dignity and courage. Many people dislike the nowhere ending, where people just go on much as they have, because there is little triumph or catharsis to be found there. I have a particular affection for the nowhere ending, though, because it is the ending that stares me most squarely in the face.
Happy endings are ephemeral. The wedding is over, and you have to get on with married life, which turns out to be one day after the other of plain old living, albeit punctuated with happy and sad events. The most happily-ever-afters end eventually with the death of one partner. And, whatever sad events happen to us, we end up going on as well, going on to more happy and sad events; that is, unless we kill ourselves. And when we die, we are either at the end of everything, or at the beginning of an afterlife. Either way, our own death mostly affects our friends and family. Our own end has very little to do with us, really. I love the nowhere ending, because it is the most true.
The most important decision regarding a proposed ending has less to do with what the writer likes, than whether or not it is appropriate. Put another way, what sort of ending has the story earned? Sometimes the writer needs to try out several. The io9 link below tells about that process, and gives us an example of that in Dr. Strangelove. The initial ending apparently called for a pie fight in the war room, rather than nuclear annihilation.
That would have been quite a different movie and not nearly as good.