I would love regulations to make it impossible to eliminate jobs unless the company is bankrupt. Considering how much is of your life is dependent on having an employer, it shouldn't be this easy for a company to toy with that. More so when a company has so much profits.
They could totally offer other positions within the company. If needed support people learning new technologies or languages. Or use these people's expertise to start new projects. but firing it totally unnecessary.