Somehow, the death of Christ had to have a purpose in the will of God that was not dependent on any sin or unworthiness in Jesus and was not the work of Satan, either.
The answer given in the New Testament was that the Son of God had died in order to reconcile the world to the Father. The principle of reconciliation went back to the Old Testament, but there it was not linked to the incarnation of the Son as it was in the New. God’s people had sinned against Him and, in order to put matters right, they had to make sacrifices that would demonstrate the sincerity of their repentance and remove the barrier that their sins had erected between them and their Creator. God was the source of life, and to turn away from Him was to court death. “The wages of sin is death” (Romans 6.23) was the principle and so, for sin to be taken away, it was necessary to die. Strictly speaking, it was those who had committed the sins who ought to have died to pay for them, but that would have been self-destructive. If I died to pay the price for my sins, reconciliation between me and God would be impossible because I would cease to exist. This was already made clear to Abraham, the ancestor of the Jewish people, who was told to sacrifice Isaac, his son and heir, but was then shown a ram, which could be put to death as a substitute for him (Genesis 22.12-14). The principle of death by proxy was thus established at the very beginning of Israel’s life, and it was this principle that was to be enshrined in the Mosaic law of sacrifices.
From: God Has Spoken: A History of Christian Thought by Gerald Bray (Wheaton: Crossway, 2014), p. 435.