Generally, moviegoers and TV viewers are force fed a protagonist that they're supposed to root for no matter what, even if some of the things said protagonist does are objectively terrible. In fact, there are a ton of supposedly good characters who don't deserve a happy ending in movies or TV. While movies where the loveable idiot doesn't get the girl exist, there are far more shows and movies that end happily even when they shouldn't.
It's not always about love. Sometimes, the heroes of the stories commit crimes for which they aren't punished at all. Sometimes, they're jerks who inexplicably get to keep their friends and family regardless of their heartless behavior.
Here's a list of characters who don't deserve their happy endings.
In Crazy, Stupid Love, Emily cheats on her longtime husband Cal with her coworker and the movie opens with her asking for a divorce. She has a mid-life crisis and that's tough but does she really deserve to get her husband back?
First of all, she somehow feels that she deserves to keep the house and kids in the separation, even though she's definitely the one who destroys the marriage. Besides that, cheating on your spouse when you have a family together is selfish. Plus, she toys with everyone's emotions by getting back together with Cal in the end.
Yes, it's an ending the audience wants but that doesn't necessarily mean that it's the ending Emily deserves.
Tess of the d'Urbervilles is a late 19th century drama that's been adapted a number of times, with one of the most recent being a four-hour BBC special starring Eddie Redmayne. In it, Tess Durbeyfield meets Angel Clare and the two fall for each other. However, when Tess reveals that she once had a child out of wedlock (a result of a heavily implied rape, in fact), Angel is disgusted that she's engaged in premarital sex, something which he has also done.
Later, Tess murders the man who raped her, and before she's hanged, she tells Angel to marry her sister. He agrees, waits for the black flag of the prison to rise signaling Tess's execution, and strolls away, hand-in-hand with Tess's sister. The story effectively challenges the morals of Victorian England, yet Angel isn't painted as a villain, while evidence suggests otherwise.
Anyone who hires a private investigator to look into a woman they're "in love with" is seriously shady. That's precisely what Ted does in There's Something About Mary. Yes, Ted is painted as a kind, sweet, all-around good guy but what he's engaging in is nothing short of stalking, even if he's using an intermediary.
What's more, that intermediary, Pat, is a supremely shady character. Ted subjects the unwitting and undeserving Mary to him and it's awful. In the end, Ted gets the girl despite introducing chaos and maybe even mortal danger to her life.
Ross and Rachel have to end up together on Friends because they're Ross and Rachel. But despite Rachel's flaws, Ross probably doesn't deserve her. Ross is obnoxious, self-important, condescending, rude, jealous, and irritable. He takes the woe-is-me trope to a whole new level. His undesirable personality isn't the only reason that Ross doesn't deserve Rachel, though.
When the two drunkenly marry in Vegas, he refuses to divorce her for fear of how people might perceive a thrice-divorced man. That is an unspeakably selfish act which illuminates the wonting character of the man. That he would do something like that should disqualify him from ever finding love.