I've no inside knowledge on Google, so can't comment on the rationale for selecting those being let go. From the outside though, Google under Pichai increasingly looks like Microsoft under Ballmer in the late 2000s/early 2010s. Balmer was lauded for delivering good numbers from a dominant market position. That was fine - until it wasn't. Under his watch, Microsoft completely misjudged the internet and totally missed…
How can companies the size of Google not stagnate at some point? Economically, they are at the scale of not-that-small countries, bigger than that and they take over the world. Maybe that's indeed Pichai's fault but no matter who is at the helm, stagnation must happen, and sometimes, just being able to slow down the fall enough so that the company can recover later when the stars align is the best thing to do, though not the most exciting.
Unlike Google, Facebook tried something. They went "Meta", going all-in on AR/VR, and that make me hate Facebook/Meta a little bit less (but only a little, I am still angry about the Oculus-Facebook account tie-in thing). This is a genuine attempt to break from stagnation, but unfortunately, and at least for now, it looks like "milking the same cow", would have been a better decision for the health of the company.