Why did Jesus have to die? He is your substitute. He took the punishment you deserved so that you can receive the blessing he deserved, all for the glory of God.
Here it is in black and white. The most important paragraph in the Bible.
But now the righteousness of God has been manifested apart from the law, although the Law and the Prophets bear witness to it-the righteousness of God through faith in Jesus Christ for all who believe. For there is no distinction: for all have sinned and fall short of the glory of God, and are justified by his grace as a gift, through the redemption that is in Christ Jesus, whom God put forward as a propitiation by his blood, to be received by faith. This was to show God’s righteousness, because in his divine forbearance he had passed over former sins. It was to show his righteousness at the present time, so that he might be just and the justifier of the one who has faith in Jesus.
Romans 3:21-26