Riyad as-SalihinChapter 5Hadith 192
Full Sharh — Riyad as-Salihin 192
وعن سهل بن سعد قال: قال رسول الله صلى الله عليه وسلم : "إنما جعل الاستئذان من أجل البصر" ((متفق عليه)).
English Translation
Sahl bin Sa'd (May Allah be pleased with him) reported:: The Messenger of Allah (ﷺ) said, "Seeking permission to enter (somebody's house) has been prescribed in order to restrain the eyes (from looking at something we are not supposed to look at).".
Source
Riyad as-Salihin(رياض الصالحين)
The Book of Greetings
Hadith Number
192