Why are they doing this now? Because they can. 2-3 years ago when it was a tight job market, Amazon (and every other tech company) was all about remote work. This started out of necessity (ie the pandemic) but it became a way to lure employees who had moved during the pandemic.
I think a lot of us deluded ourselves into thinking tech companies were different to any other employer. They are not. You are a cost they want to reduce. RTO will cause a few to quit and the rest to be more compliant. Those who quit are cheaper than a layoff.
When there's a layoff (or people quit), they aren't replaced. Why? Their work is redistributed to those who remain. It's more work done at no extra cost. At some point there is more hiring but that's part of the "natural" 5% layoff rate that is now a permanent feature of your employment.
It is all about suppressing wages and getting you to do more for the same or less money.