As long as laws don't constrain this rampant drive for short-term profit maximisation, and as long as laws permit the only truly valuable customer to be the shareholders and the C-suite's own bonus programs, this won't ever change.
Which in turn also already implies what needs to happen: Companies need to be prevented from caring more about the above two groups than the actual workers.
But this is difficult to pull off. The CEO (etc) should ultimately have the responsibility for the overall direction, but directly tieing them to the stability fo the workforce is tricky. It would be a way of doing it, of course. As in, loss of income of individual workers is directly judged against whatever payment/share program the C-suite managers enjoy, making them directly reponsible for not fostering an environment in which regular mass-layoffs are desirable.
Likewise, if shares automatically lost value whenever personel cost is cut (instead of gaining), firing workers would be heavily discouraged as it would decrease short-term profits and (correctly) flag a destabilizing event in the company.
All really tricky though, especially on an international level. But something ought to happen to keep this shit in check.