John Dickson writes: If someone commits a crime in our society, they can’t say to the judge in a courtroom, “But Your Honour, just before I mugged that person I helped an old lady cross the road.” The judge may think to himself, “Yes, that’s nice”, but he wouldn’t let the crime go unpunished. To do so would betray his position as judge. Likewise, God sees our sin, our disobedience and He has to act accordingly. And so Jesus stands in our place and takes the punishment we deserve, so that we can be set free.
John Dickson, Hanging in There, p.12