By his own choice he lived a sinless life, wholly obeying the Father. Because he was not only finite man but infinite God, he had the infinite capacity to take upon himself the sins of the world. When he went to the cross almost 2000 years ago, a holy, just, righteous God poured out his wrath upon his Son. You see, Christ not only died for us but he also died for the Father. This is described in Romans 3 where it talks about propitiation.
Propitiation basically means satisfaction of a requirement.
And when Jesus died on the cross, he not only died for us but he died to meet the holy and just requirements of the basic nature of God. An incident that took place several years ago in California illuminates what Jesus did on the cross in order to solve the problem God had in dealing with the sin of humanity. A young woman was picked up for speeding. She was ticketed and taken before the judge. Then an amazing thing took place.