None of the people making these decisions care about the long-term best interest of the company. Sundar doesn't give a shit about Google's future, he is laser focused on what really matters to him and the people he reports to: the stock price. A big round of layoffs can juice the stock, and it's a nice way to keep the numbers going up in between industry events where they can show off deceptively edited product demos and knowingly lie about the capabilities of their current and future AI offerings.

To put it another way: Google doesn't want to be a software company anymore. Google does not care about making software, or products, or the people who make or use their products. Google wants to be a growth company where the stock price goes up by two-digit percentages every quarter. That is absolutely the only thing that Google cares about. Google has realized that the best way to make this happen is to commit securities fraud by lying to their investors about their products, and by drip-feeding layoffs to show that they're serious about their underlying financials. It's theater, playing pretend at being business people. The individual products are allowed to go about their business as long as they don't cost too much money, but Google doesn't want to make money by having good products that people love to use, Google wants to make money by being a hyper-growth unicorn again, and they will do anything at all to recapture that kind of growth even if they're slitting the throat of the company to do it.

Whether this attitude is good for Google or its users is left as an exercise to the reader.