An-Nur: (28)
(If you do not find anyone therein)—meaning, if it is void of its inhabitants—(then do not enter it) until permission is granted to you by one who possesses the authority to grant it upon your finding him. The rationale for this is that entering an empty house without permission is a cause for gossip and suspicion; it involves utilizing the property of another without their consent, which resembles usurpation. This verse serves to clarify the ruling concerning houses that are void of their inhabitants, just as the previous verse clarifies the ruling concerning houses in which the inhabitants are present.
It has also been suggested that this is a confirmation of the command for seeking intimacy (asking for permission), emphasizing its necessity. In this view, the meaning is: "If you do not find therein anyone who is authorized,"—that is, anyone who possesses the right to grant permission—"then do not enter it," and so forth. This implies the prohibition of entering a place where there is someone who lacks the authority to grant permission, such as a slave or a child, without the consent of their guardian. Those who chose the first interpretation argued that the prohibition of such cases is established by the implication of the text (dalalat al-nass); therefore, contemplate this.
The Exalted said: (If you do not find...) and so on, instead of saying, "If there is no one in it," because what is considered is the state of finding it to be void of inhabitants absolutely, or void of those who possess the authority to grant permission, regardless of whether there is someone in it in reality or not. Thus it is said; and based on this, the meaning of those who interpret it as "if it were empty" refers to it being empty according to one’s perception. The same applies to its counterpart, so do not be heedless.
Furthermore, the rulings established by these two verses have been specifically delimited by the Sacred Law (Sharia). It is permissible to enter without the permission of the household for the sake of removing a reprehensible act (munkar) that cannot be rectified otherwise, or entering an empty house to extinguish a fire therein or similar exigencies. The jurists have mentioned the specific instances in which entering without the permission of the authorized person is allowed, so refer to them. It has been said that the meaning of "permission" in His saying: (until permission is granted to you) is inclusive of permission indicated by circumstances as well as legal permission; hence, it was phrased in the passive voice, and thus there is no need to speak of specific exemptions, though there is some obscurity in this.
(And if it is said to you, "Return," then return)—that is, if you are commanded by the household to return, whether the one commanding is the person authorized to grant permission or not, then return and do not persist. (That)—meaning, returning—(is purer for you)—that is, cleaner than the filth of baseness and degradation that is inseparable from persistence, obstinacy, and loitering at doors after the aforementioned command. Or, it means more beneficial for your religion and your worldly life, assuming that "purer" (azka) is derived from zakah, meaning growth. It is apparent that the superlative form (af'al) in both interpretations serves the purpose of intensification. We have qualified "loitering at doors" as described because there is no absolute baseness in it; for it has been narrated from Ibn Abbas (may Allah be pleased with them both) that he would go to the homes of the Ansar seeking hadith, sit at the door, and not ask for permission until the man came out to him. When the man would come out and see him, he would say, "O cousin of the Messenger of Allah, if only you had informed me of your presence!" He would reply, "This is how we were commanded to seek knowledge." It seems that he (may Allah be pleased with him) considered this a form of humility, which is one of the strongest causes for the opening of knowledge for the student. Allah, the Almighty and Majestic, granted me an ample share of it, and I was among the students most characterized by humility and service to the scholars; praise be to Allah the Exalted for that.
(And Allah is All-Knowing of what you do), so He knows what you commit and what you leave behind of what you have spoken, and He will reward you for it.