OOC: Kant believes thusly because it imposes the very punishment upon the criminal as was imposed upon the victim, but Kant doesn't take into consideration that the anticipation of knowing one is about to die for long periods is present for the criminal but not for the victim. The anticipation and the execution combined are, together, an excessive punishment if we apply the logic for why murderers deserve execution.
That said, Kant is often driven in his writings to make overly symmetrical logical constructs that reflecting on it's contents. I never thought much of his work.