It's been fifteen years since I read it, so bear with me on details, but there's a PB called Little Elephant Thunderfoot. It also has/had a soundtrack. It's about how the herd survives...and then the matriarch is shot dead for her tusks...but the book ends that because they had learned from her, the herd knew where to go for water.
The book hadn't been re-written last I knew, but the soundtrack WAS changed. The sound of that single, faint, in-the-distance gun shot was removed.
I used to be the buyer in a zoo and certain parents didn't mind the matriarch getting shot, but the parents who bought books like that ("books like that" also included the near-$20 price) were of the belief that children need to know the cycle of life and everything in-between. (You can spot these parents in a second in a zoo.) The parents who didn't value books, of any kind, didn't even look at it. The parents in-between these two types wouldn't buy the book if they learned while browsing it that the matriarch was shot. It was pretty cut-and-dry with this title.
I was sent a sample PB about a dancing bear. It told what REALLY happens to dancing bears. (In this story, the bear was in the middle east.) I wouldn't carry the book. It wasn't for the reason most zoos wouldn't like a book like that, though. Most zoos would not like that book because it puts captivity in a bad light. I didn't like it because the pictures, while very well done, just kind of "made light" over a very distressing fact of life...facts they put right out there in the text.
If you were to write about the horrible (horrible!) life of a dancing bear--in PB form--would you give it a different treatment other than "this happens and this happens, and this hurts the bear, and then the handler does this...?"
Oops...to answer the question...no, I don't think all PB have to have happy endings, though I wouldn't like to see that as the new wave of PBs.