You are a company. The system we have demands growth. Even very stable and reliable profits are seen as failure. There must be growth.
The people who run a company can not press a magic button to increase revenues. They can't just pull a successful new project out of nowhere. Anything like that is going to be a risk, and will probably fail. It will also take time.
The one thing they can always do is cut costs. Projects can be cancelled. Divisions can be sold off. The biggest cost at most companies is labor, and labor can be let go.
When someone controls a company, they own a lot of shares in that company. Their bosses are all shareholders who only care that the stock price goes up. Nothing the company is doing is generating huge new revenue streams. Time for layoffs.
And when some people do layoffs, everyone does them. They're all subject to the same market pressures in the same industry. One company doing them gives all the other companies in the sector permission to do likewise. If a company doesn't follow suit the market might even start to question why.
You may have seen some news that Microsoft passed Apple briefly in terms of most valuable company on Earth. You may have also noticed that Apple is much more restrained in its layoffs than the others. Not doing as many layoffs, not doing as well in the market. These things are not unrelated.