Hadhrat Moulana Ashraf Ali Thanwi (rahmatullahi ‘alaih) once mentioned:

“Some people enter their homes without greeting the household (with salaam) and making their presence known to their families. This way of entering the home is incorrect. It is part of the etiquettes of Islam that at the time of entering the home one enters with making salaam aloud. The benefit of this teaching is so that the wife and the inmates of the household will be able to make themselves presentable if they are not in a state that they wish to be seen. Similarly, it is possible that in the home there could be non mahram women of the locality present, and without informing them of one’s presence, one’s sight could fall on them. It is for this reason sharee’ah teaches us that at the time of entering the home one should make his presence known (i.e. through salaam).” (Malfoozaat Hakeemul Ummat 1/210)

Source: Ihyaauddeen.co.za