First, in atonement for our sins and those of the whole world. Second, to defeat Satan, our ancient enemy. Third, Jesus is trying to win your love. Jesus dies a most miserable death in order to show us, "I love you this much."