Once upon a time
Used to be, the job of management was to run the company profitably with the shareholders (owners) of the company receiving the benefits and a share of the profits.
These days the job of management seem to be to make as much money as possible (obscene salaries, pension and golden handshakes) and bail out before the company goes under.
The stock market seems to think that this is modus operandi for many large publicly traded corporations and the trick is to sail along with them while they pump the stock price up and then get out at the first sign of trouble.