Walking through a doorway can trigger a threshold event for your brain where it pushes aside everything you're thinking about so it can be prepared for any threats in the new area. That's why you sometimes forget why you walked into a room.
hmmm tho wouldn't a portal imply that the destination was not physically connected by anything to the original place... wiht rooms they are connected, by proximity, and by the walls