This has nothing to do with layoffs. They have plenty of money for salary even after these payouts. The layoffs are intended to reduce costs / increase profit. Google has no desire for employees; they only have employees insofar they are a necessary expense.