I had a very similar experience at Google about a year ago, and the worst part of it was that they did it 2 weeks before I was set to receive a 6-figure retention bonus for sticking around for 2 years after an acquisition.
Several other members of my team got the boot at the same time. All of us had come in via that acquisition and were set to receive that bonus, and because of the layoffs, none of us did. Folks I talked to on the inside stopped just short of saying that was why we were chosen.
It was especially galling because years before at the company that eventually got acquired by Google, I survived a round of layoffs, and leadership issued stay bonuses for everyone who was left. Those bonuses explicitly stated that they were still valid in the event that we were laid off before their time period was up.
Big companies are soulless.