Lets differentiate two things; a general push towards 'back to the office' and Amazon specifically.
On the latter first, Amazon's owner, Mr. Bezos and the current senior management team have always been keen on the 'in the office'.
Amazon's work culture is very hard-driving. Their churn rate reflects this, lots of executives don't make it. Amazon can pay well if you make it up the food chain, but they will get every cent back out of you in work product.
That type of culture is not sustainable in a work-from-home model. You don't have peer pressure the way you do in an office. Additionally, in the office, your boss need merely be 'around' with a sightline of the office floor, for you to feel those eyes glaring a hole in your back if your break is running a bit long, or you've been on a social phone call for more than five minutes.
At home, this pressure really isn't there. The boss can email you, or phone you, or maybe facetime you........but they can't stand over your shoulder, and you can't see them glare down a colleague either.
That's all above and beyond any other reasons companies/gov't may have for 'back to the office' and is very specific to Amazon, though I'm sure there are other similarly inclined employers.
****
In general, there are three or four fundamentally good reasons businesses prefer a more office oriented workforce, particularly for workplaces where productivity is harder to objectively measure.
1) How easy is it for your boss/supervisor to see that you are engaged in productive work? There are some jobs where you may work from home, where some degree of measurement is possible. For instance an in-bound call centre function has software that measures how many minutes you're available to take customer calls and how many minutes you spend on them etc etc. However, for many jobs that involved projects, collaboration, where you aren't measured by minutes online etc. are much harder to oversee when workers are remote. This drives many senior managers nuts.
2) There is real evidence that collaboration heavy jobs tend to suffer from workers not being in one place together. Innovation just slows. When your colleague is 3 desks over, or even one floor up, its relatively easy for you or he/she to go visit the other, to pop by someone's desk and say 'What do you think of..." or "How about?" etc. Yes, you can send someone an email, or facetime them or something else when working remotely, but truthfully that takes more time, and is generally felt to be more formal/intrusive and happens less.
3) There are real dis-efficiencies to having people spread out. In the same vein as the above..........When you need to know something...."What's company B's address"; "How do I do this in Excel" or "When's the meeting again?" and there's someone beside you or across from you or down the hall to ask.......questions get asked/answered quickly and mistakes get fixed quickly. When you're at home, are you going to do that by email? Are you going to phone your colleague at home?
The answer tends to be 'no' which tends to result in delays.
4) The value of networking. This is different from collaboration and speaks more to the idea of relationships w/people. Not just immediate colleagues or subordinates etc. but the receptionist, the person in payroll, the guy you buy your muffin from every morning and so on; along with people from partner businesses in your customer base or supply chain etc.
So much happens in business because you know someone............well that means you know their birthday, the names of their kids, and maybe play golf with them on Fridays in July and August.
When you're not in the office those things just don't come together in the same way. That facetime is with everyone on your team.......are you going to ask people their kids names in front of everyone in the meeting? Probably not, that happens in the Water Cooler, in the Break Room or the Food Court. etc.
In theory, you could come into the office to play golf on Fridays, but in reality, it just doesn't work that way, and if you're remote out of region, you're not flying in to play golf.
****
For those reasons, and for reasons of paranoia about what your employees are up to when you can't see them...............
As well as for security reasons..........if staff are using their own computers to do office work, what are the risks of a virus/phishing etc.
****
The above factors mentioned by others also play some role as well......... certainly there is some pressure from landlords and from government to make sure downtowns / commercial districts don't become desolate.
There is also the matter of having to retain the majority of your office space if you have to be able to have all-staff meetings, or have people work 3 or 4 per week...........but then you end up with 30% of the desks empty on any given day.