I use to work in HR for a medium sized, publicly traded company. Here's how it works:
Wall Street banks set quarterly profit targets for companies. If the companies hit the target, stock goes up, if they don't it goes down.
If stock goes down too much, C-suite is usually fired. This is what motivates them.
There is usually a few weeks between when the company calculates it's quarterly numbers and when they are legally obligated to report them.
If the profits aren't up to the Wall Street calculation, the C-suite panics and 95% of the time will go on a firing spree so when the numbers do become public they can claim they analyzed the company and magically found it was overstaffed, and already took care of the "problem". This is an attempt to save their own jobs.
In truth they did the firings in such a hurry nothing was seriously looked at, no significant problems were discovered, and the employees let go were closer to random than carefully selected based on performance and need. This happens every quarter all across America. It's rare the Wall Street targets are scrutinized. Often the companies were actually profitable too, just not as profitable as Wall Street wanted them to be.
The human factor is entirely removed at this point. Most people who were fired were perfectly good at their job, and their job was just as relevant as any other. Some analyst on a spreadsheet just calculated how many people from each team would be fired to appease shareholder feelings. It was sad to watch people take it so personally and blame themselves when it had nothing to do with them or their performance. Just a corporate wheel turning around. Many would also be rehired within months too.