Yeah, the main reason I like to build out in the open is to keep city loot respawning. If you are too close to a POI the loot respawn timer stays paused so you can't reloot it. If you are playing on some hardcore settings or don't care about the loot then it's not a terrible idea. The one big advantage to building near a town is the land surrounding the town is usually very flat. So if you want to make a nice large base you have a perfect flat surface to work with.
But as others said zombies can spawn in any direction for the horde, so if they come from the town side they can get stuck on stuff and make the horde boring.