Maybe it was greed. Who knows. Neither of us know and it doesnt even matter.
If a company big or small wants to fire you because they dont want you, then out you go. It cant be that hard to keep a job. Even when a company publicly announces job cuts, it's what? Maybe 5% of the company tops? Often less (like MS 3%). Only time you get truly large cuts is when the company is tanking, overhiring, or the company is literally on the way to bankruptcy and they gut tons of functions or close down stores.
MS has hired 100,000 more people than 10 years ago. The lay off some people last couple years. Net difference still +100k. So really they actually hired more than that.
Nobody ever cheers a company for hiring tons of people. But only bring it up when they fire.