If people truly wanted this, we wouldn't need a large zoning law apparatus to legally enforce it, now would we?
Historically these laws came about due to White Flight and wanting to keep the "other" people out.
My hypothesis is these laws persist due to effectively creating legally enforced housing cartel, pushing up house prices. Throw in some rent control to turn some poor folks against new housing, and you've got a recipe for ever increasing house prices, falling fertility rates, and the squeezing of the middle class.