Vitriol towards office environments and their overlords aside for a minute, here are a few of the positives the company gets from this:
There is wicked amounts of prestige in having a complex with your name on the marquee of the building. Client confidence skyrockets if you "Have a building" in a major metro.
Less ability for overemployment - you can guarantee the guy unable to get this one job finished at the office isn't selling his spare time to the competition down the road.
More control over employee's personal lives and psyche - if you can DEMAND that Mr. Jones be in the office instead of at his kid's parent day lunch, and you have the building to DEMAND he report to, you've driven home the point to Mr. Jones that you own his life, and he is an accessory of your money making venture first, then a family man second. This can sometimes lead to the creation of unhealthy work-lifers who are extremely profitable to the firm. This is almost impossible to do when they're at home and the oppression is harder to enforce.
It can actually be more cost effective, if you're a large enough firm. Once you pass about 40-50 members, there are instances where you can save on things like data connectivity, equipment costs, and travel to trainings/client meetings. These costs vary wildly by industry, so the fiscal math follows suit. In many cases, it's a cost-saving measure.
There are other factors - tax breaks, stipends from cities to occupy certain districts, nepotism, and social optics, but those are adjunct to the main purpose of getting employees back into a high-rise.
Mostly corporations.