Unless the poster was registered as a licensed BnB in the city of New York with a lease that allowed said usage, they were violating their lease and the law. Under NY law, it is illegal to sublet your apartment without you being physically present. It's to prevent, among other things, situations like this, which are an annoyance and a danger to the other occupants of the building.