Because they aren't worth it.
In certain failing businesses, the activities of senior management aren't directed towards trying to save the sinking ship, but to free up as much cashflow as possible and direct it to themselves. Rather than the creditors who would get it in bankruptcy.
MG Rover is my go-to example, but there are plenty: https://www.theguardian.com/business/2011/may/08/mg-rover-di...
Business schools have studied this. One of the strongest indications of a great CEO is how long they worked at the company before becoming CEO. The best CEOs started 20+ years ago and worked their way up the ladder (ie first job out of school). The worst CEOs were hired externally for the CEO role. There are exceptions that you can think of, but when a company brings in an outside CEO that should be a red flag: they don't have the internal development in place to make someone who knows the business the leader. Sadly investors have for the most part not caught onto this. (Warren Buffet knew is in the 1950s which is why he buys companies for their great leaders and keeps the leaders in place)
Even if you can find a great CEO with a great plan with your company, I don't think paying him 10M$ instead of 500k will make him more efficient or be necessary to retain him.
Also I don't think the CEOs salaries are a results of competition for the best (like tech workers), but CEO being generous with themselves (and their peers as they're all in each others' board).
Of course this assumes that one more year of development is required for the next CEO to be ready. Great CEOs try to have a replacement (or several) in training at all times.
Note that I'm assuming a great CEO - most are not great.
And I don't think he was more expensive than the previous Apple CEO (Gil Amelio?) or any alternative they had at the time.
This is what you get when your business culture rewards quick profit-taking by a small sub-class of actors over long-term business building that benefits customers and employees.
It's more profitable - personally - to asset strip a struggling company, even if it still has prospects, good will, and loyal employees, than to put in the creativity and hard work needed to make it prosper.
"Traditional" media did the exact same thing when faced with competition from the internet. They reduced the quality of their service & product when they saw a reduction in customers which only fueled a further reduction in customers, rinse and repeat til death.