One of the odder things about modern zoning codes as applied in much of the Northeastern United States is that they generally would prohibit the construction of existing neighborhoods that people live in and love.

Take Somerville, Massachusetts, a nice town adjacent to Boston and Cambridge that’s chock full of what's come to be known as “missing middle” housing — structures that are denser than a detached single-family home sitting on a large lot but smaller than a high-rise condo building. It’s not the kind of place that everyone would want to live — hard to find a big yard, for example — but plenty of people do enjoy living there, and even more people might enjoy it if it were possible to build even more houses.

But it generally isn’t. Not due to a zoning code that strictly mandates the preservation of the city’s existing character, but due to a zoning code that says the city as it actually exists is totally illegal.

Here’s a map of the entire city highlighting which existing structures conform to the existing zoning:

There are only 22 of them. And as Daniel Hertz points out at City Observatory, “this calculation actually doesn’t include parking requirements, which might very well do away with those last 22 conforming buildings.”

Somerville is an extreme case but by no means a unique one. A recent New York Times study showed that 40 percent of Manhattan buildings are illegal; basically everything (the corner stores, the English basement rental units, the narrow houses) about the Georgetown neighborhood in DC is illegal; and so on and so forth throughout the historically settled parts of the urban Northeast.

The fact that there’s evidently nothing wrong with these illegal neighborhoods and illegal houses should give us some pause as to whether all these anti-building rules are necessary. There’s no need for every American town to be built up to Somerville levels of density (indeed, you could fit 200 million people into Massachusetts at Somerville’s population density), but what’s so wrong with some new neighborhoods growing as dense as historic ones?