Working on a story I realized it would never be successful unless I made the reader want the ending. In other words, you have to persuade the reader of the outcome, not hope they also desire it as a random outcome of events. You can have whatever outcome you want, the key is to persuade the reader that the outcome is what they want too.
Two things go into this: one is constant and has to do with what we are as human beings. We want the good. The second thing is what makes the challenge: we must see it as something good. There are things independent of our perceptions which are good in terms of the outcome of stories, but we have to perceive them as such. There’s the persuasion of the story.
You have successful stories with all kinds of endings, you even have people who want stories with sad endings. Those last believe somehow that that is good. I think it has to do with believing sad endings are real, and true, and it is a good to understand that and perhaps also to learn to deal with that. That dealing with those things is necessary.
Take an unanticipated sad ending such as you have in The Children of Hurin, for example. You think after you’re done: why? Why did Tolkien write such a calamitous story? Because apprehending the utter annihilation evil aspires to, the wasteland malice creates is something necessary in this world, and understanding that is good.