I'm not arguing that the CEO is overpaid. I'm pointing out that the amount the CEO is paid is not determined by value to the company, it's determined by supply and demand in the labor market.
But, and I shouldn't have to say this it's so obvious, there wouldn't be demand in the labor market for CEOs if boards/shareholders didn't think elite CEOs provided value. There has to be a strong correlation there or the inefficient company paying a low value CEO too much will be out-competed by another company with more sense.
Say CEO X provides V units of value to the company. What should CEO X be paid (P)? It has nothing to do with Y, except in the degenerate case where P > V. P is going to be determined by the supply of CEO's with credentials similar to X. P can vary dramatically depending on that supply, but obviously V doesn't change.