People who live there are in the market for long term housing. People visiting are in the market for short term housing. Comparing this is kind of ridiculous, because they serve people with quite different needs.
This is the mirror of taxis vs owning a car. There is no good reason for it to cost so much more to take a taxi than to get a ride from some guy with a car besides government regulation.
As soon as you ignore that regulation you get products that everyone loves except the people who were benefiting under the old unfair system. In the taxi case it's people who were charging above market rates for transportation. In this case, it's people paying below market rates to live in NYC.
Long-term renters make up-front commitments. They are "buying in bulk", which reduces the inventory risk for the landlord. A hotelier, on the other hand, has to set prices to account for vacancy rates, and for the risk that their vacancy rate estimation is going to be wrong.
Long-term renters are self-serve customers. Short-term renters depart after a few days, leaving the room they leased uninhabitable. Not only does it cost money to reset and restock a room after a guest leaves, but to do so involves retaining staff, which introduces all the expense of headcount.
Without the regulation, it would be unprofitable to sublease a single apartment on AirBnb as you'd be unable to compete with people who can run a whole building at scale with dedicated maid service etc.
Anyways if you improve the legal alternatives and the margins get low enough I think a lot of the owner-occupied ones will simply give up. Right now it's so insanely profitable that it's well worth the work and inconveniences (and legal risk!) even for middle class people.
I'm just saying it's totally unfair that someone who lives in NY should pay considerably less for housing than someone visiting and since the city isn't willing to do something to fix that, this black market has popped up to take advantage of the arbitrage opportunity.