That would likely be illegal, for example in NYC an apartment must offer 80 feet of space for every tenant (so those 10 people would need to have a 800 sq ft apartment).
Sure, easy to skirt around if you're just an individual landlord, much less so if you're a company openly advertising it.