My guess is that by going fully onsite, they can probably avoid layoffs entirely. The majority of tech roles are hybrid or remote so the departures are going to be often and steady which will naturally select out anyone not interesting in making their life Amazon. They want employees that live and breath Amazon and this is how they get that (or just keep desperate people).
The hilarious thing is that the first ones to go will be the high performers. They're executing a dumb as shit layoff that will set them far behind competitors.