The debt was cancelled because of the punishment, not in spite of it. Christ volunteered to be punished in our place, so that we won't be. It wasn't forced on Jesus. He died for us out of love. A love so strong that it is out of our realm of comprehension.If your youngest child owes a debt. What sense does it make to say to the youngest, "I am forgiving you the entire debt," and then turning to the oldest who owes no debt and saying, "I am going to punish you for the debt I forgave the younger." When a debt is forgiven/canceled, no punishment is called for.
John 10:18 No one takes it from me, but I lay it down of my own accord
John 15:13 Greater love hath no man than this, that a man lay down his life for his friends.