it's a local or state law. I would call your local housing office and ask them this question.
There is no federal law stating that. In many areas this is simply a housing authority or Government housing standard and not an actual law. I believe some areas do have an actual occupancy law stating that. However, those laws are state and sometimes even county specific. You need to check with your local housing authority for the law in your specific area.
If you live in subsidized housing & your local housing authority has that rule then you still must abide by it even if it is not an actual law in your area. Government housing can have & enforce what ever rules they see fit so long as they do not violate a state or federal law.