Zombies do not stand still between your visits. Three systems move them, and the numbers behind each are plain sandbox values you can read or change.
Rally groups. Idle zombies clump into groups of up to 20 (Rally Group Size), stand within about 3 tiles of each other (Rally Group Radius), keep roughly 15 tiles between groups (Rally Group Separation) and wander about 20 tiles from where they formed (Rally Travel Distance). That is why a street looks empty and then has twenty zombies around one corner: the group is the unit, not the individual.
Redistribution. Every 12 hours on Apocalypse and Outbreak, and 18 on Rising, the game shuffles the living population between cells. Respawn is off on Apocalypse and Outbreak; Extinction and Rising respawn on a 72-hour cycle at a tenth of the original density, and Six Months Later at half. Clearing a town on Apocalypse is therefore real, but zombies from next door will drift in to replace some of them.
Noise. Sound is what turns groups into a horde. Zombies walk towards the last sound they heard for up to the Follow Sound Distance, 100 tiles by default. Gunshots are the loudest thing you own: with the Firearm Noise Multiplier at 1, shotguns carry about 200 tiles, hunting rifles around 170, assault rifles around 150 and pistols about 100. A car alarm or house alarm runs until the battery or the siren timer gives out, a running generator and a car engine are steady draws, and hammering carries about 15 to 20 tiles. Shouting, sprinting and breaking glass are small in comparison but enough to wake the next group. The helicopter, dogs and distant gunfire are metagame events that drag whole hordes across the map, often straight through your base. See weapons for noise by gun.
A horde that has lost you does not go home; it lingers. The second loud noise in the same place an hour later is the one that gets people killed.