Government officials either owned or had friends own office buildings and it made monetary sense for them to force workers back to the offices.
Even that is sunk-cost fallacy. If they own the buildings, that means they're already paid for. The only money they lose is theoretical and non-existent.
Edit: In fact, it costs them more money as you have to pay for utilities, maintenance, overhead, etc. when you fill a big building with people 5 days a week.