Why do we miss people who were bad for you, even when you know, logically, that going back would only hurt more? Here’s what research says.