The market is an idealized abstraction, not a real thing that exists. CEO pay is decided by Boards of Directors, which CEOs tend to be on, and which are part of a narrow, highly connected class that CEOs are also members of.
> Prices aren't "decided" by anyone
Yes, the prices that a firm will offer for particular work are decided by particular decision-makers at the firm, not abstract outside forces. The market is a model of the the aggregate of factors influencing the decisions those people make, and the decisions employees make about accepting work.
A salary is just what it costs to retain your employment -- that's it. When you can find higher pay elsewhere, eventually you will take the offer. Companies arent donating money.
CEO pay has only become significant in recent years because of equity, ie., CEOs since the 80s have increasingly been paid in shares. That is where the disparaity comes from.
Since the CEOs job is largely to focus on the share price -- do you see why giving them lots of equity is exactly the sensible thing to do?
Having a high share price is a secondary indicator of expected revenue, growth, and profit.
Giving CEOs equity is exactly the wrong sort of incentive, because it provides opportunities of massaging the expected long term results to achieve short term price variations in the favor of the CEO.
The business being "profitable and successful" is the objective of its owners because they want a return on their investment. It is the objective of the CEO only insofar as that is what they are hired to do.
CEOs are given equity to align their incentives with the company owners.
Im not sure who you think is hiring CEOs or why, but it isn't someone with an idealistic sense of "success". The CEO is given their mandate by the company investors.
Can't we describe the reality better if we accept that the "labor market" as an analogy to e.g. a potato market or washing machine market is a faulty model?
Salaries are determined by the market price for that labour; meaning if you want to hire Alice to be your CEO you are bidding against others who also want Alice. The price is what Alice will take to work for you, and not another company.
That is essentially how all salaries are set. There is no mystery.
The public steadfastly refuse to believe in anything other than a mythological-moral meaning to prices. It is absolutely bizarre. Prices arent set by anyone and have no moral significance. (All this stuff about tech "scalping" given shortages is likewise the same fallacy. )
The market isn't a seamless black box that spits out price signals. It is people.
Most boards are cohorts with CEOs.