Until they decide to make it their decision and do something like tax companies per onsite worker and/or increased property taxes for office space that could have been better used. Lots of options.
Cities also have their own perverse incentives to maintaining the 9-5 downtown status quo. A whole host of businesses depend on these workers and they are involved in the chamber of commerce and various other orgs city leaders listen to when making decisions.
So you drive the office workers out of the city and then what do you do with the other commercial business? They still commute or you raise taxes enough for the city center to die out and hope for suburbanization?
You tear down those old, unsafe office buildings (we have lots of them in our city) and put up modern mixed use buildings. More people == more workers == more customers == more businesses. Add in some cultural features and you have a vibrant downtown that doesn't rely on commuters and doesn't become a ghost-town after 5:00.