RTO of course has absolutely nothing to do with productivity. In fact, it almost certainly decreases it as who can get any work done with all the noise and clamor in an average office?
But it is being done to prop up other business interests, such as commerical real estate and downtown business owners who want to force people into an office so their businesses can make money peddling overpriced, shitty sandwiches and drinks.
I will never work in an office again. I will start my own business before that happens. I am, depending on the task, 2-100x more productive working from home.