I do not see why it is the governments business if I want to let someone sleep on my couch for a few bucks.
This is just another barrier against the free market.
As always with government it’s all about the revenue. People doing that aren’t paying the hotel room tax, and since it’s so wide open they never will. Of course the way around this law is you go ahead and “rent” for the month anyway, but with the knowledge the person will only be there for 2 nights. Handshake deals are hard to bust.
Part of the issue is that some of these apartments are rent-controlled or rent-stabilized (technically different in NYC, but same concept). The result is that the leaseholder is making a fat profit, while the actual owner of the property is forced by the government to rent the apartment for way below market rates.