I agree with the example given in the sibling comment, and this is why the framers believed there needed to be a final “safety valve” outside the courts. Legal systems are imperfect, and sometimes a pardon is the only practical way to remedy an egregious error.
Another example where pardons might be useful is when laws are changed after sentencing. If the new law does not provide for retroactive adjustments, a president or governor can grant clemency in order to correct disparities in sentencing outcomes.