As an author of YA books I can answer this question.
First and foremost don’t tell me what to write about. I and everyone else who writes books has the freedom to write about what ever they want.
Be they good or bad, our job is to illicit emotions from our readers be they good or bad, or even indifferent about our books.
Our sole role is to sell you a story and get you out of the world you live in for as long as you are reading our books.
Not everyone lives a perfect life. Not everyone married the prince charming they were supposed to be with.
Life is hard, people are complicated and hard to deal with. We as writers tell stories to again illicit emotions. We do this by telling the good and the bad tales.
The world isn’t black and white and so we are allowed to write the world we see around us.
So this was a long response, written from my phone (cant text at all) so forgive me for spelling mistakes. I’ll rewrite it when I get my computer back. but it’s from the heart take it as you will.