The point of things like the fire code is to ensure that if, for example, you've got 20 people sleeping in a building the building is set up to be able to get those people out easily if it catches on fire. So it's not a problem until you've got 20 people sleeping in the building. If the building's only safe for 4 people sleeping in it then there's no fire code problem if 4 people are sleeping in it. It only becomes a problem when you cram 20 people in there.