system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do we sometimes forget things or thoughts that we were thinking about just a few seconds ago and then can never seem to recollect them.
gpt
Also known as “the doorway/portal effect”, this is an evolutionary hold over from when humans were still hunter-gatherers. The prevailing theory is that when we entered a new area, our brains would do a kind of quick wipe of all surface thoughts, making you take in more information from the new environment. This would allow us to become aware of potential food or danger more easily, as we are focused on the new place instead of our thoughts.

In the modern day, this means sometimes you walk into the kitchen for water, then forget why you got up, then remember you’re thirsty when you get back to your chair. Basically your brain deletes some short-term memory, trying to make it easier to survive in the wild, but instead simply trolling itself.

TL:DR; brain tries to optimize for caveman lifestyle, ends up inconveniencing modern day houseman lifestyle.