The death of Jesus was a historical necessity because it is something that frequently happens. It is natural for criminals to be persecuted and killed, even before. Also, death was not contained to such people. Those who got in the way of power, like Jesus did, also get killed. Jesus' path of radical fidelity to God got Him a lot of enemies who plotted against Him.
It was a prophetic necessity because prophets die for their faith. And Jesus, being the Son of God, is no exception. Prophets do God's will and announce hope for the poor thus their deaths are actually an expression of love, wherein God manifests Himself since God is love.
The cross of Jesus is a scandal since we don't really understand how God can see that the only way to achieve the greater good of salvation is through the death of His Son.
Furthermore, the cross also depicts an image of suffering and pain that deviates and contradicts the true meaning of His death, which is the whole life of Jesus being something pleasing to God and that it was lived in faith and love until the end.
This then leads us to the mystery of theodicy. Because of this scandal, the cross has no meaning directly discoverable by human beings. If there is an explanation, it must be hidden in God, for Jesus died according to the definite plan and foreknowledge of God. Thus