In the ancient shelters of Catal Huyuk built in 8000 BC, the doors were built on the ceilings:
To keep away dangerous animals
People settled in the area, who were about 6000 strong in number learnt a clever way that avoided dangerous predators entering their houses. The houses were built in a way that they were attached to each other and the ceilings functioned as streets.