What's wrong with happy endings? Each lead Trek character so far has arguably got a happy ending at the end of their respective franchises (if you consider Undiscovered Country as the end for Kirk's run opposed to Generations, but even with Generations, Kirk chose to come back to help Picard and died saving countless people, which was a pretty fitting end). Avery Brooks and the DS9 writers worked out a compromise to not kill off his character, to leave his fate in limbo, but with the promise he would be back...someday.
Why should Burnham not have a happy end? Throughout her life she lost her biological parents, was killed as a child, committed mutiny against Georgiou-another mother figure-and played a role in her death, was imprisoned (for mutiny and also helping instigate a war), and had to fight her way back to redemption. Then she left behind all she knew, including her beloved adopted family, to go into the future. From there, she fell in love with Book, who lost his entire planet and most of his family, and she also had to deal with that loss while trying to stop him from in Season 4 from acting on revenge. Burnham has experienced a lot of tragedy and turmoil in her life. Why doesn't she deserve a happy ending?
And considering the real world here, they were thankfully given more time to put together like a 15 or so minutes coda. I doubt they had the money or time to explore every other side character. Discovery was always about Burnham's journey, so it made sense that the series ended focused on her.
When I think about entertainment, genre, or otherwise, how many end with their protagonists having bad endings? I would argue-unscientifically of course-that most do not.