There's a huge swath of tech playoffs right now. Tens or hundreds of thousands of devs are out of work and looking. Many, many others are worried they are next on the chopping block.
There's no better time for big corps to make unpopular decisions like this.
Many employees will be scared to refuse the mandate, because they see the layoffs. They fear for their job. They see the market is tough for getting hired elsewhere. They'll go back to the office out of fear.
If devs leave, it will be easier than ever to replace them.