Well, this seems to be slightly different question. In my experience, there is no particular issue with not complying with the latest codes and standards. The regulations only require a property owner have a valid certificate of occupancy.
It's not unknown for a local authority (like a municipality or a fire chief) to issue a deficiency notice which would require a building owner to upgrade their fire protection usually within a certain amount of time. Where I come from (Australia), the authority would probably have to go to court and get a court order before they force a building to shut down and the owner can challenge this by obtaining their own expert opinions or requesting an extension of time.
In my role of providing fire protection advice to building owners, if I see anything which does not comply with current building regulations, In my inspection report, I would advise them to have it brought into compliance at some time in the future, but not necessarily right away.