Sahih al-Bukhari, Hadith 4512

Narrated Al-Bara: In the Pre-lslamic Period when the people assumed Ihram, they would enter their houses from the back. So Allah revealed:-- "And it is not righteousness that you enter houses from the back, but the righteous man is he who fears Allah, obeys His Orders and keeps away from what He has forbidden. So enter houses through their doors." (2.189)

حَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ مُوسَى، عَنْ إِسْرَائِيلَ، عَنْ أَبِي إِسْحَاقَ، عَنِ الْبَرَاءِ، قَالَ كَانُوا إِذَا أَحْرَمُوا فِي الْجَاهِلِيَّةِ أَتَوُا الْبَيْتَ مِنْ ظَهْرِهِ، فَأَنْزَلَ اللَّهُ ‏{‏وَلَيْسَ الْبِرُّ بِأَنْ تَأْتُوا الْبُيُوتَ مِنْ ظُهُورِهَا وَلَكِنَّ الْبِرَّ مَنِ اتَّقَى وَأْتُوا الْبُيُوتَ مِنْ أَبْوَابِهَا‏}‏

sunnah.com