Why shouldn't landlords have the right to turn their buildings into Airbnbn hotels? (Assuming that the landlord pays taxes as usual, and the evicted residents were evicted under the rental agreement).
Also hotel safety laws do not exist in a vacuum. AirBnb renters should be properly informed that the building they are entering has passed building inspection codes, but cannot guarantee hotel-level hygiene and fire code safety. Once fully informed, if the renter still chooses AirBnb, it's their call. People can sleep over at their friends' houses, or at strangers' houses without exchange of money anyway - the fact that money does change hands doesn't change the facts about the parties involved.
The only way justification I could see is that if it were not hygienic, there is a chance of a outbreak of a virus happening (but that is no different than the metro or a flea market).
It absolutely matters, and your scenario is a very serious one. Permanent residents know where the fire exits are, and which hallways are dead-ends. Temporary residents may not even be aware which windows open onto a fire escape.
http://www.nytimes.com/2013/01/03/nyregion/58-fire-deaths-in...
Real estate is at an extreme premium and hotel space is scarce. There are a lot of scammers and shady people in this city so its only natural that Airbnb will be abused (I've even been sucked into an Airbnb-based con job in NYC myself).
I think the issue isn't so much that this law is on the books, its that they haven't updated the legislation to accomodate people who rent on Airbnb safely.