I don’t think capitalism is an optimization machine for CEO compensation. I think it is just for shareholder value; if shareholders thought they could pay a CEO less they would in a heartbeat.
Counterproductive doesn't mean worthless. Better distribution of fewer resources is, at a certain point, desirable contra massive inequality with higher overall wealth.
> The market is a natural phenomenon of voluntary trade.
But the market requires oversight to ensure that you have meaningful choices. Otherwise, monopolies and corruption will work to remove your preferred options, forcing you to pay rents.