This topic was recently discussed in a science program in the UK. They believed this phenomena was a survival technique from our ancient ancestor so when going from one environment to another something like jungle to savannah, the mind can be fully aware for any new danger that the new environment might hold. It seems reasonable. There are many things we do that are instinctual. I am reminded of the science reports of time slowing down in accidents including sight/vision becoming black and white because it can process faster in this mode rather than process colour vision, possibly giving milliseconds of extra time that might be the difference between life and death.
"Entering or exiting through a doorway serves as an 'event boundary' in the mind, which separates episodes of activity and files them away," Radvansky explains.
that explains a lot for me.....lots of doorways where I work....I can blame my brain farts on them. Good to have something to blame instead of me
If you must have finale absolute answers, then become an hard nosed atheist or a fundie of any religion, both seem to be black and white thinkers, and have only contempt for those who think differently.