It is said that thinking about one thing over and over which we have no power to change, does not bring anything good. Personally, I think we do not realize the need for change until we come to regret a thing. Whether it is the way we behave on dating with our partner, the immature approach of a professional situation or the reaction in a tense moment, awareness brings regrets for the harm I have done.
The same mechanism applies to others. Think how many dysfunctional relationships are afloat in one faiths in the ability to change of the other. Or how many give credit to people who already hurt them, because they are not convinced that they will not get hurt again.
However, the reality is different: no one will change until it realizes the impact / severity / consequence of actions on its own. And unfortunately (or fortunately) these lessons come much later, sometimes years or decades away from such incidents.
Even if it is a lesson learned and bad consequences (in) directly on how to think, live and act, any regret is, after all, the result of something we want to exclude from our lives and become more careful , generous, conscious or not, impartial with those around us.