You're right that people give professional favor based on personal affinity, what I'm not sure you're right about is that it's so wrong to do so. If I don't like you, then it's likely that your direct reports will feel the same way, as will potential clients or partners, which is a risk to the business, so I'm not likely to choose you for a position that puts you in a position to interact with many people. Most high senior positions require a ton of soft skills, so you're probably going to hit a ceiling unless you prove that you have them. Making your manager and peers like and trust you is step 1; the best people go far beyond that very quickly.
Nobody ever promised that career progression would be based on coding chops, especially when each jump up the ladder means less time coding and more time people-hacking.
Likeability is neither transitive nor uniform across a population. It's quite common for someone to be well-liked by some people and disliked by others for quite arbitrary reasons; it's also common for two people that you both like to dislike each other. Actually, highly successful people seem more likely to show this polarization, where they are liked by some and hated by others, simply because they are less shy about putting their personal opinions out there and people will have a wide variety of reactions to those opinions.
Nobody ever promised that career progression would be based on coding chops, especially when each jump up the ladder means less time coding and more time people-hacking.