Early on in my career I couldn't understand why it was always the worst and most incompetent people who got promoted.
Then I realized that it's not their incompetence that gets them promoted per se, it's that if they're employed while being utterly useless and incompetent they have SOMETHING else going on that keeps them employed.
And it's that something else (whether that is politics, brown nosing, nepotism, bullying) that also gets them promoted.
Someone I once knew put it in a slightly more charitable way.
"Having friends is a skill."