It is a breakdown of neurotransmitters.
Think of it as a bunch of frayed wires reaching their end. wires sometimes intermittently break contact and that train of thought is derailed.
The longer we have known things, memories, the more established the connections to them are. This means that older memories tend to stay while momentary memories are easily lost.
My mother can tell you all about her childhood and our growing up. But she can't remember what was said 30 seconds ago or what she did an hour ago. She has no idea why she got up or that she was talking on the phone.
It is very hard to deal with for everyone else.