The illegal hotels law was written in order to stop large operators like Smart Apartments from using residential buildings as short-term rentals in order to get around hotel taxes and safety laws. The law means that about half the listings - the offers for entire apartments, as opposed to just rooms within an apartment - are illegal in New York state.