Understanding Human Behaviour: The Art of Not Taking Things Personally
We humans are strange creatures. Sometimes we do things even though we don't intend to, and sometimes we act, then realize what we have done. Therefore, not taking anything personally can save you from overthinking questions like "Why did they do this to me?" or "What did I do to deserve this?" even though things happen for random reasons that have nothing to do with you.
However, not taking things personally can also help you let things go. You might think, "They did this to me, so what?" I'm not suggesting you do nothing if someone hurts you, but trying to understand their perspective can benefit both you and your relationship with that person. If you notice the same behaviour repeating, then leaving them or maintaining your distance is the best course of action.