Building departments are kind of between a rock and a hard place. Unless they have specific local ordinances otherwise, as long at the "house" meets the minimum structural, space and sanitation requirements, they have to allow it, no matter how it is built.
Example: The area I live in is within city limits and governed by the city zoning ordinance (but no homes association). The zoning is for "residential agricultural" use, i.e., you can do ag. type uses (farming, livestock, etc.), but you can't have any "accessory buildings" (barns, etc.) unless there is a residence on the property as a "primary occupancy".
Property next door to me was just bare ground and guy wanted to build a pole barn there. As it turns out, he owned a lawn care company and just wanted a place for a building to run his business out of. However, city would not approve his permit app. because there was no residence on the property. However, you could get away with running a business like that from your house, as long as you aren't storing equipment outside, etc. His answer to that was to build a small, one room plus bathroom "residence" within the building.
So the city had to approve it, even though no one actually lives there and he is violating the spirit and intent of the zoning ordinance. But the city couldn't stop him because the building has a "dwelling unit" in it, and they can't prove that nobody actually lives there.
The guy actually lives in a swanky neighborhood (where such things would NEVER be allowed) in an adjacent city.