Why Do People Stay in Relationships After Emotionally Detaching?

Don’t you think it’s unfair when people detach themselves emotionally from a relationship long before they actually end it? Why not leave when you first start to feel detached, instead of waiting until you’re fully ready to end it? Do they seriously not feel bad for the other person, because for them, it’s a surprise?