The thing is, a happy ending can be many different things. It can be "they lived happily ever after," which is one of the simplest "happy" endings, but a happy ending is also when the hero triumphs in the end, even if horrid and tragic things happen all along the way.
For example, I've been reading a lot of David Weber books lately (I'm *extremely* impressed with his books--excellent writing, wonderful characters, engaging plots, funny narrative and dialogue...good stuff). In one of his series, the Honor Harrington series, quite a few characters (that I really cared about) died horribly. Honor herself ends up with tons of mental and physical damage through her adventures. But she *triumphs* in the end. Lots of good things happen too, but they all come with a price. No matter how many tragic and depressing things happen to her and her family and friends, she finds the will to keep going, to keep trying, and she wins out over the evil forces plotting against her.
In many ways, it's more of a happy ending *because* of the sacrifices made to get there.
I love happy endings. I HATE HATE HATE depressing literature (I'm the one who has a passionate, burning hatred for Canticle for Lebowitz. Seriously. I hate that book more than any other book I can think of at the moment). I hate books like that because there is no triumph. They have all the terrible, tragic experiences without any of the hope, determination, love, or triumph to go with it. Their message is "Life is really, really, really terrible. Oh, and then you die." I prefer books with a message saying "Yeah, these are terrible and tragic things. But there's a reason to keep going. There's always hope. There's always the possibility of good. And it's *worth* all the pain and suffering."
With my penchant for happy endings, it might seem odd that one of my favorite books is a post-Apocalyptic book (Wolf and Iron, if anyone cares). The thing is, even though everything has fallen apart, there's still life and love beyond, through, and because of the pain and suffering.
I guess I just like to read books that share my worldview, which makes sense, I suppose.
I know that bad things happen, quite intimately, but I don't believe for one second that the bad things trump the good. In many ways the bad things enhance the good, because then the good things are all that much more precious and important.