Anything that has an emotion attached to it, becomes memorable for us. This is why it is easy to remember the happy moments and sad moments of our life vs what we ate for breakfast last week.
What is the connection between the memory and the emotion involved? It usually validates a belief about ourselves or the situation. Even in an unhappy memory, it is usually the same, but in this case, a negative and unhappy belief gets validated.
If one could go back to the situation and think about what was our thought process at that moment, and which belief did that satisfy, we can be more aware of how we react in our relationships with people in our life.
Our assumptions and bias in beliefs lead us to feel a certain way. With self-awareness we can change perceptions and lead more fulfilling lives.