Minecraft wiki entry for Before_Village_%26_Pillage, associated text: A house is initiated by a nearby villager. Without a villager nearby, it is not considered a "house," just some blocks and a door: