Buffy the Vampire Slayer has some powerful writing on this subject. Joss Whedon wrote it to get a bit of plotwise-sloppy writing past the viewers, and it worked really well. ;-) The idea is there's a curse, there's vengeance being enacted, by gypsies (bear with me, if you're not a fan of the show) against Angel, the vampire who killed one of them a century ago. The curse was to give him a soul--a conscience, remorse for all the atrocities he'd committed as a vampire. The vengeance part meant that if he was ever completely happy for even a moment, he'd lose the soul. (And be free to kill again, yes. It's not logical. But it was emotionally powerful when that moment of happiness came when he and Buffy made love, and the morning after he was monstrous to her.) He got the soul back, and can never be completely happy for fear of becoming a monster again.
Just to be clear, it's since been shown that having sex will not necessarily make him completely happy. ;-)
Anyway. The show very neatly puts vengeance and happiness into opposition. The gypsies spoke thus:
Enyos: You know what it is, this thing vengeance?
Jenny: Uncle, I have served you. I have been faithful. I need to know...
Enyos: (interrupts) To the modern man vengeance is a verb, an idea. Payback. One thing for another. Like commerce. Not with us. Vengeance is a living thing. It passes through generations. It commands. It kills.
Jenny: You told me to watch Angel. You told me to keep him from the Slayer. I tried. But there are other factors. There are terrible things happening here that we cannot control.
Enyos: We control nothing. We are not wizards, Janna. We merely play our part.
Jenny: Angel could be of help to us. I mean, he may be the only chance we have to stop the Judge.
Enyos: It is too late for that.
Enyos: The curse. Angel is meant to suffer, not to live as human. One moment of true happiness, of contentment, one moment where the soul that we restored no longer plagues his thoughts, and that soul is taken from him.
Jenny: Then, if somehow, if... if it's happened... then Angelus is back.
Enyos: I hoped to stop it. But I realize now it was arranged to be so.
Jenny: Buffy loves him.
Enyos: And now she will have to kill him.
Jenny: (stands up) Unless he kills her first! Uncle, this is insanity! People are going to die.
Enyos: Yes. It is not justice we serve. It is vengeance.
Jenny: (exhales and grabs her coat and bag) You are a fool. We're all fools.
Joss started with the end on this. He wanted Buffy to have a miserable morning after, the epitome of "you sleep with him, and all of a sudden he's a different guy". And he came upon the idea of mucking about with Angel's nature as vampire with a soul. And a previously-unknown aspect of the curse. And, he says in the DVD commentary for this episode, it doesn't make a lot of sense to risk loosing this awful vampire on the world again, unrestrained by soul/conscience. But he was struck by the idea that "vengeance is a living thing", and it all came together. It may still be a rationally stupid thing for the gypsies to do, but it has an emotional weight and reality to it that cannot be denied.