The Quraysh were called the Hums, and during ihram they would enter their houses through the doors. The Ansar and the rest of the Arabs, however, would not enter through the doors during ihram.Once the Messenger of Allah ﷺ was in a garden, and he came out through its door, with Qutbah bin Amir al-Ansari coming out alongside him.The people said, "Messenger of Allah, Qutbah bin Amir is a sinful man. He came out with you through the door."The Prophet ﷺ asked him, "What made you do this?"Qutbah replied, "I saw you do it, so I did the same."The Prophet ﷺ said, "I am from the Hums."Qutbah responded, "My religion is your religion."So Allah revealed, "Righteousness is not that you enter houses from their backs, but righteousness is one who fears Allah. And enter houses from their doors" [Baqarah 2:189].
كانت قريش يدعون الحمس وكانوا يدخلون من الأبواب في الإحرام، وكانت الأنصار وسائر العرب لا يدخلون من الأبواب في الإحرام، فبينما رسول الله ﷺ في بستان فخرج من بابه، وخرج معه قطبة بن عامر الأنصاري فقالوا: يا رسول الله، إن قطبة بن عامر رجل فاجر، إنه خرج معك من الباب، فقال: ما حملك على ذلك؟ قال: رأيتك فعلت ففعلت، فقال: إني أحمسي، فقال: إن ديني دينك، فأنزل الله عز وجل: {وليس البر بأن تأتوا البيوت من ظهورها ولكن البر من اتقى وأتوا البيوت من أبوابها}
Recorded by Hakim (1/483) and Wahidi in Asbab al-Nuzul (p. 48), both from the hadith of Amash, from Abu Sufyan, from Jabir, who related it. Hakim said, "Sahih according to the criteria of the two Shaykhs, though they did not record it with this addition." And it is as he said, except that there is disagreement about Amash regarding whether the chain is connected or has a gap, and the connected version is the correct one because it contains additional information, and it is supported by the hadith of Bara.Then Wahidi said, "The commentators said, in pre-Islamic times and in the early period of Islam, when a man entered the state of ihram for Hajj or Umrah, he would not enter an enclosure, a house, or a dwelling through its door. If he was among the people who lived in clay houses, he would make an opening in the back of his house through which to go in and out, or he would set up a ladder and climb through it. If he was among the tent dwellers, he would exit from behind the tent or pavilion, and would not enter through the door until he had ended his state of ihram. They regarded this as a religious obligation, except for those who belonged to the Hums, who were Quraysh, Kinanah, Khuza, Thaqif, Khatham, the tribe of Amir bin Sasaah, and the tribe of Nadr bin Muawiya. They were called Hums because of their strictness in their religion.They said, one day the Messenger of Allah entered a house belonging to one of the Ansar, and a man from the Ansar entered behind him through the door while he was in a state of ihram. The people objected to what he had done, so the Messenger of Allah said to him, "Why did you enter through the door while you are in a state of ihram?" The man replied, "I saw you enter through the door, so I entered following you." The Messenger of Allah said, "I am a Hamsi." The man said, "If you are a Hamsi, then I too am a Hamsi. Our religion is one and the same. I accept your guidance, your way, and your religion." So Allah revealed this verse." End of quotation.