If you’ve ever let unworn clothes clutter your closet just because they were expensive, or followed through on plans you were dreading because you already bought tickets, you’re familiar with the sunk cost fallacy.

“The sunk cost effect is the general tendency for people to continue an endeavor, or continue consuming or pursuing an option, if they’ve invested time or money or some resource in it,” says Christopher Olivola, an assistant professor of marketing at Carnegie Mellon’s Tepper School of Business and the author of a 2018 paper on the topic published in the journal Psychological Science. “That effect becomes a fallacy if it’s pushing you to do things that are making you unhappy or worse off.”

This idea often applies to money, but invested time, energy or pain can also influence behavior. “Romantic relationships are a classic one,” Olivola says. “The longer you’ve been together, the harder it is to break up.”

Humans get caught in this psychological trap for several possible reasons, Olivola says. Sticking with the plan, even when it no longer serves you, could be an attempt to correct cognitive dissonance: the mental disconnect between paying for something and not getting the expected return on investment. It could also be a knee-jerk reaction to regret. Or, Olivola says, it could be an attempt to convince others, and ourselves, that we’re not wasteful.

“All of these things are irrational, in the sense that you should realize the money is gone,” Olivola says. “But I do think people do these things because they want to convince themselves that they’ve managed to recapture the loss.”

You still feel the guilt of “wasting” money even when it’s not your own. Olivola’s paper found that we “feel that need to honor other people’s sunk cost in the same way that you feel the need to honor your own” — even if the person who paid the cost isn’t a close friend or family member. If you got sick on the day of a concert, Olivola’s research suggests you’d be just as likely to force yourself to go if a coworker gifted you pricey tickets as if you had bought them yourself.

To reach that finding, Olivola designed a series of experiments constructed to measure the extent to which the sunk cost effect would sway people to make hypothetical decisions. Nearly across the board, the results affirmed the existence and strength of the phenomenon, both as it applies to individuals and others.

In one scenario, people were asked to imagine that they were accidentally scheduled to take two trips — one to Montreal, and one to Cancun — during the same weekend, forcing them to choose one. When they were told one flight cost $200 and the other cost $800, people were significantly more likely to opt for the pricey trip — even if they would have preferred the cheaper destination. This effect held true whether people imagined that they had booked the flights, or that friends had given them the tickets as gifts.

Other experiments further illustrated how the sunk cost fallacy applies to others. Participants were asked to imagine that they felt full after eating a few bites of rich cake at a potluck party. Some were told the cake had been purchased from a local bakery on sale, while others were told the cake was expensive and had come from a shop almost an hour away. Depending on the scenario, participants were asked to imagine that they had bought the cake themselves, or that someone else had purchased it. They were then asked whether they’d finish the cake, despite feeling full. Regardless of who had bought the cake — friends, strangers or the participants themselves — people were far more likely to say they’d keep eating the expensive cake, according to the study.

Olivola says it’s not totally clear why we feel so compelled to honor others’ investments about as much as we honor our own, even when they work against us. But people should try to overcome both versions of the sunk cost fallacy, he says.

“What’s done is done,” Olivola says. “There’s nothing you can do to regain money that’s lost — and pursuing something that makes you unhappy not only isn’t going to get your money back, but it’s also going to make you worse off. You’re just digging a deeper hole.”

Write to Jamie Ducharme at jamie.ducharme@time.com.