"Luck" has a lot to do with it, but it also has a lot to do with many other types of success that most people don't have problems with.
Research, logic, and reason simply doesn't support the myth of the CEO. But board members and CEOs themselves like to indulge in that myth.
Is it any shock that a class of people value people in their own set over the people that actually do the work?
Other potential explanations for inflated CEO pay (relative to previous decades) include executive compensation boards staffed by executives in similar positions from other companies, and boards that want to keep up appearances by having a highly paid CEO.
Rich CEO = successful company = investor opportunity
No one cares about the shlubs doing the actual work.
Indeed, a lot of the time no one cares about the actual work, or the long-term prospects of success.
The contention is that a CEO saves $x million, and thereby 'earns' some [preposterous] fraction thereof, as a finders' fee.
This is a similar logic to a broker taking a percentage of a large market transaction.
That part I disagree with and think many upset about CEO compensation (or market speculators/industry windfalls) is that this is earning in any meaningful way.
In particular, the presumption that there is some intrinsic relationship between the compensation earned and the numbers transacted seems baseless.
The CEO and market trader alike do not provide the value; they are simply in a desk where the numbers are large.
The reason a CEO can 'save millions or make billions' is merely because they have been seated where their quotidian decisions (however talented) have disproportionate leverage and consequence.
That is not a result of ability or skill, except in the unconvincing sense that they had the skill to weasel (my word) their way into that desk, nominally on personal merit, in fact, usually by virtue of connection and political merit.
That sort of 'earning' does not pass the smell test for most of us who have not lucked into those seats, and never shall.