This is most likely a very old housing restriction.  By legal terms it would be considered a brothel if four unrelated women occupy the same apartment.