One reason is that God can and has in the past chosen to leave owing a debt of temporal punishment even after the eternal penalty for sin has been remitted. For example, humanity suffers under the temporal punishments of labor, pain, sickness and death to this day even though the redemption has taken place and spiritual sonship restored through baptism. Mary, the sister of Moses, was forgiven by God for complaining against her brother. One may also question why God leaves temporal penalties in place after removing eternal penalties for sins. It is, firstly, a question of discharging a debt of honor, making a reparatory gesture after the real reparation has been completed.
Penance also has rehabilitative benefits.
It is for discipline that you have to endure. Penance restores the loss or damage caused by sin, for example, a thief may be sorry for stealing a large sum of money from some one else, but he is still required to return the money taken and even do time in prison. Finally, penance satisfies the human need to mourn for tragedies and sin, particularly mortal sin, which is the greatest tragedy. Further, Catholics believe that many of the faithful throughout the centuries virgins, martyrs, confessors, saints etc. have performed penances and good works far in excess of what was due as temporal punishment for their own sins. This can be done for every good action possesses a double value that of merit and that of satisfaction.