People can stay in unhappy relationships for many reasons: fear of being alone, the sense that you can’t do better, or reluctance to drop a partner with whom you’ve spent so much time and attention. (Economists would point anyone thinking that way to the sunk cost fallacy.)

All of those reasons are fundamentally selfish—based in what’s thought to be best for the person doing the deciding. A new study, though, suggests that sometimes people stay in unfulfilling relationships not just for themselves: They don’t want to hurt their partner’s feelings.

It’s perhaps a surprising bit of altruism, though not to anyone who’s ever listened to a friend worry about what a breakup would do to their significant other. To suss out those findings, researchers surveyed 500 people who were thinking about breaking up with a partner, then followed up after two months to see what they did. They found that participants who believed their partners really wanted the relationship to work were less likely to initiate a break up.

More from Tonic:

In other words, seeing their partner as more dependent on the relationship correlated with being less willing to end it. That was true even for people who didn’t have strong reasons of their own to stay together—those who weren’t satisfied, didn’t feel invested, or who felt they had other options.

“Even people who are thinking about breaking up still care about their partner and their partner’s feelings,” Samantha Joel, co-author of the study and assistant professor at Western University in Ontario, Canada, said. “People may be willing to stay in a relatively unfulfilling relationship for the sake of their partner.” (You may wonder if this is gendered behavior; Noel says that though the researchers tested for gender differences, they didn’t find any.)

Again, this may sound all-too familiar. But the study authors note that previous research has focused on self-interested reasons for ending a relationship. This work suggests there may also be self-effacing reasons for not ending a relationship—what researchers call “prosocial” reasons, which take other people’s feelings and perspectives into consideration.

That doesn’t mean, obviously, that sticking around is the “right” thing to do for the partner’s sake. First, thinking you know your partner’s feelings doesn’t mean you actually do. It’s easy to misread even a close partner, leading to a false belief that a breakup would be painful. In fact, it might actually be met with relief.

Even without that misreading, a belief that things might improve might make you stick around even when you’re ready to check out. Joel points out that can happen; it’s one way of arguing for riding out a rough patch. But that’s not a given, and sticking with a partner who doesn’t increase your happiness can simply prolong a bad situation. That’s bad for both parties. Because ultimately, as Joel notes, “Who wants a partner who doesn’t really want to be in the relationship?”

Sign up here to get advice and true stories about mental health in your inbox every week.