If you forgot why you walked into the kitchen, it was probably for water or peace and quiet.
The Doorway That Erases Your Errand
In 2011, University of Notre Dame psychologist Gabriel Radvansky ran participants through both virtual and real-world rooms, asking them to carry objects across equal distances - either staying inside one large room or stepping through a doorway into the next. Crossing a threshold consistently caused a sharp spike in forgetting. Radvansky called it the "Doorway Effect": your brain treats a new room as an "event boundary," neatly filing away the previous context to clear mental desk space.
So when you freeze in front of the pantry wondering why you walked in, relax - you aren't losing your mind. Your hippocampus just archived the living room; grab a glass of water and enjoy the quiet.
Source: Gabriel A. Radvansky, Sabine A. Krawietz & Andrea K. Tamplin (2011), 'Walking through doorways causes forgetting,' Quarterly Journal of Experimental Psychology.