Inside them are water wells, communication channels between levels, doors to stop and traps or other devices to kill if the invaders tried to come in, kitchens with chimneys, air shafts, even grave yards, all designed to let the villagers to stay inside for extended periods until the enemies gave up and went away.