To be clear, I'm not defeneding this pratice but explaining it. This cycle is how large businesses operate to foster growth over time.
Lay off people to tell stock holders they are becoming more efficient.
wait
Hiring spree, announce new features, new directions, hype hype hype
wait
Lay offs! Trimming overhead! Streamlining! Much efficency! Good business!
wait
Hyyyyyyype! Discord announces a plan to replace iMessage, Email and the entire concept of texting! Triples their staff! Such hype!
Rinse, repeat
It's horrific for the employees and a scathing indictment as capitalism as a whole. But, this is how large businesses work, not nessecarily a massive corporate slip up.