Google's revenues were flat last year but costs were up. Hence, profits were down. The C-suite's insight into the future seems to be that future revenues are not going to make up for the current cost structure. The stock price is roughly correlated with profits (let's ignore NVDA for a moment). So to keep the stock price afloat, profits must be propped up. If the stock price drops, all employees are suddenly paid less, especially the ones you value most. So not doing layoffs is equivalent to giving everyone a pay cut. Pay cuts are even worse for morale and long-term company performance than layoffs. The choice seems clear to me.
On top of that, when you're a publicly traded company, your obligation to your shareholders is at least as great as your obligation to employees. If you don't like that agreement, don't go public (as a worker, don't agree to work for a for-profit company). Google is a for-profit, not a cooperative.