Taharos, Chapter 8, Mishnah 5. A large part of this chapter revolves around the friction between two types of Jew: the chaver, who handles his food and vessels with strict care regarding tumah and taharah, and the am ha'aretz, whose word in such matters cannot be relied upon. As a rule, once an am ha'aretz has been left to move about freely somewhere, we worry that he fingered whatever was there and left it tamei. Our mishnah teaches a case in which there is no such worry at all.
The mishnah begins: "Eishes am ha'aretz shenichnesa l'soch beiso shel chaver l'hotzi b'no o bito o behemto." A woman married to an am ha'aretz, and she carries her husband's status with respect to these halachos, steps inside a chaver's home to take out her son, her daughter, or her animal. Imagine how commonplace this is: the youngsters have been at play in the neighbor's house, and their mother comes by to bring one of them home, or an animal of hers has strayed in and she comes to lead it away.
The Ruling
"Habayis tahor" - the house remains tahor. Nothing inside it is presumed to have been touched or defiled by her entry.
The mishnah gives the reason: "mipnei shenichnesa shelo bir'shus" - because she entered without permission. The case being described is one where she did not ask to come in. She simply stepped inside to fetch what she came for. Note also that the mishnah is speaking of a situation where the wife of the chaver is not standing there in the room with her; otherwise the entire question would not arise.
Why Entering Without Permission Protects the House
At first glance one might have thought the opposite: if she came in unannounced, with nobody watching, surely she would feel free to touch whatever she pleased. The mishnah teaches that human nature works the other way. Precisely because she let herself in without asking, she is uneasy. She knows that at any moment the lady of the house could walk in and find her standing there, and the last thing she wants is to be discovered handling someone else's belongings and be suspected of snooping or of taking what is not hers.
A woman in such a position hurries: she does not reach out for anything, she collects the child or the beast, and she is out the door. Given that she has every motivation to keep from laying a hand on anything, we trust that instinct, and the contents of the house retain their status of taharah.