Minecraft wiki entry for Door-based_iron_golem_farming, associated text: Since villagers will turn into witches when struck by lightning (albeit it happens very rarely), it is sometimes needed to refill the villagers into the farm after a thunderstorm. But if the farm is not built inside the spawn chunk, you can just move away from the farm to let the chunk unload during a thunderstorm. Villagers bred inside the farm will also occasionally spawn outside of the containers.