Google doesn't need good will; they'll always be able to get commodity labor. As long as they take care of a large enough number of senior folks they will be okay. (Unclear they're doing this, ofc.)
Companies like GitLab are different; these layoffs seem extremely risky long-term. But they're unprofitable and capital has gotten a lot more expensive, so they might not have much of a choice.
Do the founders still believe in Google culture? It seemed to be styled as a place that other Stanford new college grads would want to go (money, status, lifestyle, ambition).
Without goodwill, even senior people pulling down $500K-$1M and performing very well are going to be thinking about when it makes sense to leave (for a competitor, startup, or windsurfing/woodworking).
Companies like GitLab are different; these layoffs seem extremely risky long-term. But they're unprofitable and capital has gotten a lot more expensive, so they might not have much of a choice.