In the interest of a quick and dirty post, you may have failed to consider some logical things.
For example, no connection to anyone currently, perhaps the BOD expects a $20 million loss over the coming year and the CEO cuts it to $10 million including his $1 million bonus which a grateful Board awards him. Still no profit, but he did his job and may do it again next fiscal year.
Another possibility: While the company didn't make a profit this year due to the write off of a discontinued business segment, there was adequate cash to award bonuses which the BOD felt were thoroughly earned and justified based on normal operations.
Watch out for the simplistic notions of "No profit, no bonus". And totally wary of government setting CEO salaries. If they can do that, they can set yours, too.
Not a simplistic approach and it was not an off the cuff thought. Neither of your examples address the "running a business into the ground with bad decisions" options. See the post above for a simple way of addressing the problem.
Again, NO PROFIT, NO BONUS. That does not "set CEO Salaries", it eliminates corporations from using the tax system to compensate for mediocrity.