There's something deeply weird about (about 1/3 of people's) tribal instincts, that says it's much better to be friends with a bad person with power than a good person with power. The good person wouldn't hurt you for no reason. The bad person...
I'm not sure it's explicit, or anything beyond just instinct. It's clearly driven by what was necessary to survive in the smaller, more brutal cultures of the past.
But boy howdy does it not work well in the modern era, not in any way, and it has massive penalties for everyone involved (and sets up bad incentives).
The solution is easy enough: be generous enough with respect and praise to those you like. And create the social norm that, you want others to exceed you, that in an ideal world they'd look down at you, seeing your flaws, compassionately, but also having been a better person.
I don't think it's rare for people to come up with that solution.
But the world's a complicated place, and a lot of people are worried and hateful these days.