Why would any company hire more employees than it needs? Do you really think the amount of work at Google has declined?
If Google didn't need them they shouldn't have hired them in the first place.
Same applies to all the big tech companies that hire boatloads of people and then have major layoffs. Exceptions apply to companies that are actually still fighting to survive or who have massive _declines_ in profits but a lot of the time the layoffs are just a "protect profits" measure, not a "we didn't need them" measure.
There is, of course, a separate discussion to be had around "do big companies really need _thousands_ of employees?" but by their own thinking the answer is yes, so they did need to hire them, and thus the question to them is "Why was protecting literal billions in profits more important than protecting the people who you employed? Why do you think you'd be worse off with those people you claimed to need, but 1 billion less 'profit' ? "