Why did the Father will the death of his only beloved Son, and in so painful and shameful a form? Why should such a good and holy individual person die for everyone's sin? How does such a violent act make for a peaceful outcome with mankind?
The full counsel of God should be declared. Yes, God is love (1 John 4:16, 1 John 4:8, 1 John 4:19) but the written Word of God also reveals that He is a righteous judge as well.
11 God is a righteous judge, and a God who feels indignation every day.
12 If a man does not repent, God will whet his sword; he has bent and readied his bow;
13 he has prepared for him his deadly weapons, making his arrows fiery shafts.
14 Behold, the wicked man conceives evil and is pregnant with mischief and gives birth to lies.
15 He makes a pit, digging it out, and falls into the hole that he has made.
16 His mischief returns upon his own head, and on his own skull his violence descends.
Jesus vicarious death atones for our unrighteousness, we now have the righteousness of Jesus Christ, by which we escape the wrath of the righteous judge.
1 Therefore, since we have been justified by faith, we[a] have peace with God through our Lord Jesus Christ. ... 9 Since, therefore, we have now been justified by his blood, much more shall we be saved by him from the wrath of God.
Because the Father had “laid on him the iniquity of us all” (Isaiah 53:6). Jesus’ death was vicarious (undergone in our place) and atoning (securing remission of sins for us and reconciliation to God). It was a sacrificial death, fulfilling the principle of atonement taught in connection with the Old Testament sacrifices: “without the shedding of blood there is no forgiveness of sins” (Hebrews 9:22; Leviticus 17:11).
As the “last Adam,” (1 Corinthians 15:45) the second man in history to act on mankind’s behalf, Jesus died a representative death. As a sacrificial victim who put away our sins by undergoing the death penalty that was our due, Jesus died as our substitute. By removing God’s wrath against us for sin, his death was an act of propitiation (Romans 3:25; 1 John 2:2, 1 John 4:10 --”[expiation](https://www.google.com.au/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=define%20expiation),” signifying that which puts away sin, is only half the meaning).
By saving us from slavery to ungodliness and divine retribution for sin, Jesus’ death was an act of redemption (Galatians 3:13; Ephesians 1:7; 1 Peter 1:18-19). By mediating and making peace between us and God, it was an act of reconciliation (Romans 5:10-11). It opened the door to our justification (pardon and acceptance) and our adoption (becoming God’s sons and heirs - Romans 5:1,9; Galatians 4:4-5).
Source (adapted from): https://bible.org/illustration/vicarious-death-christ