There are several things that may lead to this. Some less savory than others.
1. Extended family
2. Short term economic hardships
3. Undocumented families
4. Govt. subsidized "emergency housing"
Similar to Social Services putting an entire family up in a single motel room for months on end.
5. Short term rentals
It does happen but this does not sound like the situation you are describing
This type of multi-family communal living is more common in some cultures.
7. Remote possibility that they are being used as stash houses
These are where smugglers will house people temporarily while they either pay or work off their debt. More prevalent in some areas but truly not the norm. Also, less likely when there are multiple children involved.