I don’t have much to add other than what has already been stated, but I’m going to give my opinion on it anyways.
I do think that there is a very big difference between a mechanical bad ending, like the “game over” screen-o’-death prompted from say, taking a wrong turn, and from an ending that isn’t classified as traditionally happy. And then I also think there are distinctions from those two distinctions to break it down further.
I completely agree that mechanical game overs can be…annoying, to say the least, when they are completely random and not from a narrative given in the game. For example, you are playing along and then your character suddenly gets to a fork in the road. There are no hints given, no information laid before you about either choice, nothing that you could have discerned about this situation - you are simply told to choose between A and B. If you choose A, well congrats! You managed to get eaten by a dragon. Game over, next time choose B.
Yeah, that’s annoying.
That was of course a simplistic reduction of an example, but the point is - a random death shouldn’t be a guessing game. Mechanical deaths can, however, be a part of the story. Like a mystery-puzzle game might have you pay attention to hints along the way that would lead you to choosing something over the other. Or it might have you managing different stats in a strategy-based game that leads to you running out of vital resources. Or you might have to fight insanely tough monster enemies in a turn-based game. Those serve their own narrative purpose and allow for some opposing force. By offering death and a game-over, you have incentive that drives the purpose of that genre. Now these might no be something everyone enjoys, but it can’t be said that they are pointless (and can definitely enhance the experience a lot if done well!)
Narrative bad endings are another thing of their own. I, personally, love a good bittersweet tragedy more than anything. Especially the classic in which the main character sacrifices themselves in a redemption arc. Mmpf. Or my absolute favorite story of all time is a romance manga called ‘Paradise Kiss’. (Spoilers of course) The two main characters are the stars of the whole thing and are very flawed individuals, but their flaws are what make them so perfect for each other. The story is basically a build-up of their crazy relationship and how they grow so much together as people and figure out who they are. You expect these two characters to get stay together in the end, through all of their trials and tribulations they are so in love and you want them to be together in the end, but in the biggest shout-inducing twist that you did not expect, but maybe you did and just didn’t want to accept it,…they end up breaking up. Oh, they love each other. They never stop loving each other. They will always be the ‘one that got away’ and they know this as they are breaking up, it’s just that to be the people that they love, they had to pursue their own paths and those (as heart-wrenching as it is) would never be one in the same. It makes you sad, and angry, and gouges a big pit in your heart…but it fits. A happy story wouldn’t be their story - it wouldn’t be the people they are. And it’s a ‘good’ ending because it’s satisfying, but it’s ‘bad’ because it’s not ‘good.’
Like stated above, it is definitely a matter of preference. Some people don’t like bittersweet, and they hate tragedy, and these type of stories are not their thing. That’s okay, and it’s also okay to love them. I don’t think they are inherently a failure of the author, though, or are meant to make the audience mad. I think that only comes in poor implementation such as - this only exists to make the reader suffer, even though it was given no narrative place. (Just as a happy ending that doesn’t fit out of nowhere can be a bad implementation.) You still have to offer the reader gratification, but sometimes that comes from sacrifice, or a twist, or by something that isn’t a classical happy ending.