Ever wonder why some people stay in an toxic relationship for so much longer than necessary? How easy it is to forgive someone — and for what — depends, of course, upon the individual, but for those who seem to forgive people way too easily, well, their brain might just be wired that way.

The study was published in Nature Human Behavior and was conducted at Yale, University of Oxford, University College London, and the International School for Advanced Studies. According to Molly Crockett, Yale psychologist and senior author of the journal, “The brain forms social impressions in a way that can enable forgiveness,” she explains.

“Because people sometimes behave badly by accident, we need to be able to update bad impressions that turn out to be mistaken. Otherwise, we might end relationships prematurely and miss out on the many benefits of social connection.”

RELATED: 4 Amazing Things that Happen Once You Let Go of a Toxic Relationship

In the study, more than 1500 subjects observed the choices of two strangers who faced a moral dilemma — whether to inflict electric shocks on another person in exchange for money.

The “good” strangers refused to shock another person for money, while the “bad” strangers went for the money every time. The subjects were then asked their impressions of the morality of the strangers and how confident they were about their impressions.

The subjects unsurprisingly formed positive impressions of the “good” strangers and were confident in their assessment. The subjects were far less confident about the “bad” strangers, however, changing their impression and being quick to forgive when the “bad” strangers occasionally made a better moral choice.

“This pattern of impression updating may provide some insight into why people sometimes hold on to bad relationships, Crockett said. “We think our findings reveal a basic predisposition towards giving others, even strangers, the benefit of the doubt. The human mind is built for maintaining social relationships, even when partners sometimes behave badly.”

While forgiveness is a crucial part of any relationship — we all make mistakes, after all! — this study does make a convincing case for why so many of us forgive and forget so easily.