Yes, compassionate clemency powers are legitimate, because it is a way for the executive branch to check the judiciary branch. With something being as big of a deal as the death penalty, it is a good thing that one branch has a veto power over another. For political reasons, this power is not exercised very often, so it is a fair check on another branch's powers.
Legal codes are rigid, but crime isn't black and white. Compassionate clemency powers enable judges to consider the human element in criminal proceedings. These powers are legitimate because they allow for a judge's interpretation of the crime, the intent, and the violated law. They are not meant to trivialize crime and punishment, but are instead meant to promote humane verdicts.