Subletting implies 30 days or longer, and in NYC leasees and renters are entitled by law to sublet their apartment provided they give notice to the property owner. The owner can decline in certain situations, but it's on them to prove why their reason is valid. Airbnb laws are concerning advertising of giving out your apartment for less than thirty days, which is illegal in its entirety without a proper license.
In either case, the main point is that lease agreements (and in many cases, even the law, as we saw in Santa Monica) don't stop people from doing what they want to do. I don't know why you think the parent comment has anything to do with poor people; sometimes a person just wants to have a good idea of who's living in their building, regardless of wealth.