Minecraft wiki entry for Creating_a_village, associated text: Inaccessible to villagers as they cannot get in. To put villagers in it, you need to use a boat/minecart to get them in, then lock the door.