Because of evil. Before God/Jesus/Holy Spirit created this cosmos, the decision was made that Jesus as the exact representation of the Father must pay for the evil that they allowed in for us to have free will so we could love God out of free will, the highest form of live.
Because is love and can do nothing that is not out of love, he knew he must pay the price for allowing his creation to have free will, so in what C. S. Lewis called the deeper magic, God put into the fabric of the cosmos that if a perfectly innocent man was put to death by claiming to be God, and it turns out its true, then the curse that was going to come from evil, would be reversed, this was the plan all along.
God/Jesus/Holy Spirit created the cosmos and made man and allowed satan to do what he was created for, to get evil into creation, this allowing free will, which has caused much sin and suffering for about 6000 years so far, and because God allowed evil in he must pay the cost.
Jesus set aside his glory and became man, living as a human he never sinned and was killed for false reasons scripture says he became sin.
2 Cor 5:19 In Christ God was reconciling the cosmos to himself, not counting peoples trespasses against them, and he has given us the message of reconciliation.
Acts 3:21 In Jesus Christ is the restoration of all things ( Apokatastasis) , which God has spoken by the mouths of all his Holy prophets since the world began.
Jesus had a mission John12:47 Jesus came to save the cosmos not judge it.
1 Cor 15:28 His completed mission will be " when God is all in all"
That is why Jesus came.