I don’t think you need to ‘understand’ because in doing that you’re trying to figure out if there is something YOU could have done to stop it from happening. It’s also keeping you mentally attached to that person, which is not a great idea as they are someone who hurt you.