Why do we walk into a room and forget why we came in?
The Real Answer
Walking through a doorway can sometimes make an intention harder to retrieve, but there is no literal doorway switch that erases or files away a memory. Research on event boundaries suggests that changes in context can affect what is easiest to recall, although doorway effects vary across experiments and conditions. Everyday lapses can also come from distraction, divided attention, and ordinary working-memory limits.
You walk into the kitchen with one job, forget it, and instead of retracing your steps you start opening cabinets until the instruction comes back. Five minutes later you're holding something unrelated and pretending that was probably why you came in.
The Dunce Dynamics Institute Examines Why People Ask This
The lapse feels unusually dramatic because you can remember having a reason while losing the reason itself. A doorway is an obvious boundary, so it becomes the suspect even though context change is only one possible contributor.