The physical act of walking through a doorway is the reason why you sometimes walk into a room and completely forget what you were doing. Going through a door signifies the beginning or end of something, so it creates an ‘event boundary’ within your mind. Every time you pass through a doorway, your brain is filing away the thoughts you had in your previous location to make room for a new group of memories in the next.