How can people just live houses/apartments that are filthy without cleaning them regularly?

There’s a spectrum of cleanliness that goes from “Oh shit, we might actually have to condemn the building” all the way to “In an emergency, you could probably do surgery in here.”

Existing at either end of that spectrum can actually be a symptom of mental illness (depression/hoarding on one end, OCD on the other).

That said, the area in between is vast. Some people like it tidy, some people don’t give a shit and don’t want to waste time and energy making things look nice as long as there’s no serious sanitation issues.