When I lived in Manassas, Virginia, we had a problem with groups of illegals inhabiting 3RR townhouses: we were talking 20-25 (with kids) in a 1800 square foot TH. . .
After one nearly burned down a TH in my development, the local County government passed a law limiting a house to no more than 5 unrelated inhabitants. . .
The local people certainly have a right to pass such a law. I’m not sure it’s just, but it is what it is I guess.