It's a defense mechanism. Let's be honest, people hate feeling like crap, that's why they do/say things that make them feel better. In the case of failed relationships, it's kind of a "it's not me it's you" kind of thing when the person who was rejected is by him or herself. It's more like they're trying to justify to themselves that the relationship ending wasn't their fault and therefore alleviating any guilt that may otherwise come with admitting it. Same thing can be said for people who don't like admitting when they are wrong in an argument when they clearly are.