I don't see the difference, though - when I had people living in other rooms of the same apartment, they could've just as well been in my room - I couldn't focus because I'd always imagine someone interrupting me :-)...
Hm, I'm evidently coming from a rather different context here. I'm thinking of things in terms of, if you close your door, people typically won't knock unless it's important, because if you were open to talking to people at the time, you would have left your door open or simply been in a public space rather than your room.