Winning in the end is not mandatory. I know, I know, in most fantasy stories, actually in most stories regardless of genre, the protagonists win. They win and save the world, get the princes and princesses and get so much treasure that they can just retire and even their grandchildren will be filthy rich. They always win in fantasy.
But it is not mandatory. It is not mandatory to win in the end and neither it is mandatory to win in the middle. Loses makes the story change direction, makes it fuller and richer, gives place to a huge set of emotions that we don't normally see in our games.
Losing can also change and rewind the game. If the PCs always win, there's no challenge, there's no need for playing. If they will always win, it doesn't really matter that they've chose right and not left, or that they killed the orcs and not the goblins.
When we play for the plot, for the story, losing is what gives us those dark moments in the middle of the third arc, the moments from which we find something in ourselves and rise to the challenge, amazing those around us and even us as we do so.
Losing shows us other sides of our characters, sides that we couldn't really explore otherwise, because we didn't have those moments of loss, of depression, of disappointment from the way the things turned out. We were about to win, and somehow we lost.
Losing gives meaning to a learning curve, losing gives meaning to those hard-earned victories. Because they truly are victories that were hard to earn, scattered between all those loses.
And losing in the end is part of what makes a story into a tragedy. Because in a tragedy, we either lose or lose what we fought for, we can't really win. And tragedy is not the only type of story in which the end is bleak.
Winning is not mandatory. Losing should be part of the outcome list. It deserves its spot there.