I understand that great sports players are paid more because only they can do what they do, and you need the absolute best talent.
Not really. Sports players, actors, musicians, and so on are paid well because many people are willing to pay a small amount for their service. Those small amounts add up to large sums.
CEOs are in the same boat as they earn a profit from the income of each and every employee. If you had a small business with one employee, it is not unreasonable to keep, say, 10% of their income for yourself to compensate for the risk of employing them. Now multiply the same logic in a major business for the CEO, and you have yourself a huge income.
If you were the worlds worst programmer just managing to keep a job at $10/hr., but also managed to sell your changes to 10 other companies at the same rate, suddenly you are making $100/hr. That still doesn't make you a good programmer.
I don't think there is any distortion. Some people sell their services to one entity, and others sell their services to multiple entities. The latter group make lots of money, the former group do not simple due to basic multiplication.