I know I referred to this earlier as the "Loveable Misogynist", but there's also excusable racism in this particular character type. It's a blend of the Politically Incorrect Hero and the Jerk With a Heart of Gold with some elements of Good Flaws, Bad Flaws mixed in.
And what it winds up making is a surprisingly generic hero for serialised drama television. Sure, he's heroic, but he's also a bit of a jerk and he has some bad habits. Sometimes, he's a walking train wreck who also happens to be the Only Expert and everyone therefore needs them.
You know the type. If you knew them in real life, you would fucking hate them with a passion. But, because the show takes pains to display his redeeming qualities, you like him, but hate some of the things he does.
Or he does a few kind things for someone he usually treats as the Butt Monkey to show that he really does have a heart of gold underneath that unloveable everything else. But it never sticks. The Loveable Jerk never really learns his lesson and goes back to being an arsehole within five episodes, tops.
The most common use of this is procedural drama, but potentially the most annoying is in the title character of Lucifer. He's Satan, he's supposed to be a jerk, but thanks to a Dark Backstory we're allowed to think he's suffered enough. But let's face it, you would fucking hate him if you knew him, and want to get to the opposite side of the globe to get away from him because commercial space travel isn't a thing, yet.
We laugh at Lucy's shenanigans. They're adorable. But only because we're told that it's funny and excusable and... normal.
This sort of thing should not be normal. Someone who's a raging hate-ist should not be allowed to tread rough-shod over others because we've learned that he could be briefly redeemable from television. It's that sort of thing that lead to people electing the Muppet. Sure, he's a sexist, racist, serial philanderer, but he's promised to do some good things [or what some people THINK are good things]. Sure he's practically incomprehensible when he speaks out loud, sure he rambles like someone who has something wrong in their brain wiring. Sure, some experts say that he's incapable of complex thought [source] or even rational thought, but if people just "give him a chance" that heart of gold will just shine through.
I don't know about you, but that's the kind of rationalisation that abused spouses use to make their abusers look a little better than they really are.
We need to tone down the "Loveable Jerk" population in our media. Make them learn a few things. Make them struggle to be better people. Make them actually redeem themselves and put in the hard work to do all of that. Don't make them give the Butt Monkey flowers or jewellery and then go back to beating them in the dark.
That sort of thing should never fly again.