Companies get a lot of tax credit from the city or the state for opening an office, with the assumption that the workers pay taxes, spend money and improve the local economy and businesses. If the workers aren't physically present, the company probably won't get the tax credit because it comes with strings attached.
This is why the mayor of NYC was pushing firms to bring their workers back into the office because the city economy collapses otherwise.