In the days of ignorance, when people entered the state of ihram, they would approach their houses from the back. Allah then revealed, "Righteousness is not that you enter houses from their backs, but righteousness is one who fears Allah. So enter houses through their doors" [Baqarah 2:189].
حدثنا عبيد الله بن موسى عن إسرائيل عن أبي إسحاق
كانوا إذا أحرموا في الجاهلية أتوا البيت من ظهره فأنزل الله {وليس البر بأن تأتوا البيوت من ظهورها ولكن البر من اتقى وأتوا البيوت من أبوابها}