You know that this was not so in ancient times do you? The concept of innocent until proven guilty is relatively new. It was more guilty until proven otherwise and the punishments for a crime was first on the victims (or their closest relatives) to decide wjich punishment to be enacted and how. Or it was to the lord (who would decide based on the wishes of the victim(s) and the tradition) to decide.
Here I must stress that I am not for the death penalty and I do strongly believe in social reinsertion (I am Canadian afterall) but I also understand the logic behind the death penalty. I do not have to agree with something to understand its view point/reason to exist. I am quite happy with our legal system where you can hope to see a criminal redeemed and be a part of our society. At the same time, when I play in a fantasy medieval time, I can endorse their system because it is not reality. This said.
In a fantasy setting what we perceive as evil might well be perceived as good and vice versa. Showing mercy to a small crime such as stealing a bread would be applauded in such a world but showing mercy to a heartless murderer would be perceived as evil to the core because it would be ignoring his/her victim(s). A lord that would not do the maximum to bring a killer to the galloes pole would be seen either as incompetent or as evil as the criminal. Thus, the famous:" Wanted dead or alive posters". Be it a person or a monster, a lord can not let things go unpunished. And as distasteful as it is, the death penalty was a common occurrence in those dark times. It was even preceded by torture to exact both vengeance and admitting of one's guilt.
So you are right that in modern time, it is not a good thing. But in a fantasy medieval time, it was the good thing to do.