Narrated Abu Ishaq:
I heard Al-Bara' (radiallaahu `anhu) saying, "The above Verse was revealed regarding us, for the Ansar on returning from Hajj never entered their houses through the proper doors but from behind. One of the Ansar came and entered through the door and he was taunted for it. Therefore, the following was revealed: --
"It is not righteousness That you enter the houses from the back, But the righteous man is He who fears Allah, Obeys His order and keeps away from What He has forbidden So, enter houses through the proper doors." (2.189)
The ayah in Arabic:
وَلَيْسَ الْبِرُّ بِأَن تَأْتُواْ الْبُيُوتَ مِن ظُهُورِهَا وَلَـكِنَّ الْبِرَّ مَنِ اتَّقَى وَأْتُواْ الْبُيُوتَ مِنْ أَبْوَبِهَا وَاتَّقُواْ اللَّهَ لَعَلَّكُمْ تُفْلِحُونَ
It is not Al-Birr (piety, righteousness, etc.) that you enter the houses from the back, but Al-Birr is from Taqwa. So enter houses through their proper doors, and have Taqwa of Allah that you may be successful.)
Ibn Kathir says:
Al-Bukhari recorded that Al-Bara' said, "During the time of Jahiliyyah, they used to enter the house from the back upon assuming the Ihram. Thereafter, Allah revealed (the following Ayah):
﴿وَلَيْسَ الْبِرُّ بِأَن تَأْتُواْ الْبُيُوتَ مِن ظُهُورِهَا وَلَـكِنَّ الْبِرَّ مَنِ اتَّقَى وَأْتُواْ الْبُيُوتَ مِنْ أَبْوَبِهَا﴾(It is not Al-Birr (piety, righteousness, etc.) that you enter the houses from the back but Al-Birr is from Taqwa. So enter houses through their proper doors.)
Abu Dawud At-Tayalisi recorded the same Hadith from Al-Bara' but with the wording; "The Ansar used to enter their houses from the back when returning from a journey. Thereafter, this Ayah (2:189 above) was revealed...''
Al-Hasan said, "When some people during the time of Jahiliyyah would leave home to travel, and then decide not to travel, they would not enter the house from its door. Rather, they would climb over the back wall. Allah the Exalted said:
﴿وَلَيْسَ الْبِرُّ بِأَن تَأْتُواْ الْبُيُوتَ مِن ظُهُورِهَا﴾(It is not Al-Birr (piety, righteousness) that you enter the houses from the back,).''
﴿وَاتَّقُواْ اللَّهَ لَعَلَّكُمْ تُفْلِحُونَ﴾(...and have Taqwa of Allah that you may be successful.) Have Taqwa of Allah, means to do what He has commanded you and refrain from what He has forbidden for you,
﴿لَعَلَّكُمْ تُفْلِحُونَ﴾(that you may be successful.) tomorrow when you stand before Him and He thus rewards you perfectly.
This generally proves two things:
- Not all things common in society/culture conform with Islam and its practices. It's wise to check authenticity of all norms and myths, lest you commit bid`aat thinking you're collecting great reward.
- Omens are baseless. And so are superstitions. True taqwa and piety are not judged by actions like entering one's house from front or behind. Instead, it's judged by the level of obedience to Allah's commands. (It goes without saying that Allah alone is the Judge for it.)