Those are some important thoughts RTHolmes. I think it's helpful to distinguish the 3 alternating goals of punishment that come in and out of fashion:
1. Incarcerate the criminal because he deserves it.
2. Incarcerate the criminal to reform him and improve him.
3. Incarcerate the criminal to protect society.
Which one are we working with here? What troubles me is that none of these approaches has ever done a wit to prevent future crime. The UK seems to take approach #2 more than the USA; #1 and #3 are the more popular approaches here.
I think the motivation for releasing a criminal on compassionate grounds is high mindedness. It's a demonstration that although harm has occurred, the society is above resentment and is ready to move on. In this particular case, the criminal is no longer a threat to society, there's no point in reforming him because he'll be a dead in a number of months, and punishing him further would be punishment for its own sake.
Where they really screwed up, and where I was naive, is in predicting how the release would be perceived in Lybia. I'm going to be blunt: Scotland looks foolish. What Scotland believed it was doing out of high mindedness the Lybians seem to perceive as weakness or even an outright pardon.