Has it ever happened to you to enter a room and forget why you are there?
There is a not life threatening phenomenon called, “event boundary” which is responsible for this memory gap.
According to an experiment by the scientist Gabriel Radvansky, our brains compartmentalize events and tie them to the environment, or room, in which they occurred. By moving from one room to the next, the brain effectively creates a file containing all the information about the first room, and what you did there, and tucks it away.
Got anything to add?