Why should any of this be the business of government?
That would have easily handled by a law requiring insurance for any property owner before renting space, especially residential space. Insurance inspectors would have properly rated the cost of the insurance based on the construction they found on inspection standards of what had been built inside that warehouse and its relative safety and risks they would be assuming. The rents would have been priced out of the range of people to live there due to those poor construction standards. The free market can take care of such abuses if properly applied.
Similarly, the DMV in every state should be replaced by again requiring drivers and automobiles to be insured before being allowed on the road. If you can find an insurer willing to insure your driving skill behind the wheel with enough indemnity for any damage you may do, then you can drive. A private insurance company should also be willing to cover your vehicle for any damage it may incur while being exposed to such damage.
With today's technology, a vehicle should not even start without proper insurance in place, showing that the acceptance of responsibility has taken place. When it is, an LCD screen License plate would illuminate showing it's valid, ID, etc. It could only be driven by its registered drivers, temporary drivers such as mechanics, valets, etc, for limited distances, or authorized borrowers of the vehicle.
How about an individual exercising common sense and good judgement? Why does anyone need to be told that a jam packed, filthy, dilapidated building is unsafe? Answer no one needs to be told. Those unfortunate people could see the risk and chose to enter inspite of it.
Of course every city in the country has codes. I’m sure you are aware of that. How superfluous.