It's more of a supply and demand problem. Foreseeing a recession for much of 2023, most companies are planning to reduce their production (supply) knowing that the demand will likely not be there.
Layoffs are always unpopular but let's look at the situation the other way around. It's better for a company, any company, boost the production (= hire as much staff as they think they need) to face a booming demand and then let them go a year or two later, if the cycle inverts, rather than not hiring them at all. Compared to not being hired at all, at least we have 12,000 more people who will have had Google on their CVs for a few years.
It's capitalism, baby...
What's odious, surely for a non-US citizen, is the fact that hires are not numbers: they are men and women with skills, with dreams and ambitions, with families and bills. The overly brutal "US style" redundancy - here's your box, pack and leave within 30 minutes...and by the way, your login is blocked - is something that we almost never see in Europe. This is why, as Mr Pichai corporate statement doesn't fail to mention, the redundancy process would take quite a bit longer to complete in non-US territories.
You guys (Americans) were pioneer in workers' rights movements, union action, the whole shebangs. Then what happened? Unbridled capitalism happened...the delusion that, just because you're in the most special country on Earth, your career will be one of constantly higher success and constantly more money. This is proving wrong and most US workers/employees are among those, in the civilised world, who will bear the consequences of waking up and smelling the coffee more than most others.