Jesus is good because He is God and sinless Man.
God is all-good, the source and summit of all good things, Goodness Itself. He is Goodness because He Himself has said so: “I form the light, and create the darkness, I make well-being and create woe; I, the LORD, do all these things.” God creates woe in that He permits evil to exist so He can bring out of it a greater good - for example, permitting Adam to sin so He can redeem man; permitting the Israelites to become slaves in Egypt so He can rescue them.
Jesus is God and Man, true God and true Man. As Man, He is completely sinless. He is completely sinless because, as Man, He enjoyed the Beatific Vision. The Beatific Vision is God’s Face, seeing God face-to-face, not with our eyes but with our intellects, since God cannot be seen with physical eyes since He is not physical but Spirit. When a man enjoys the Beatific Vision, he is unable to sin, because He is so enraptured by God’s Beauty that he would not wish to offend God by committing a sin. But the Beatific Vision is God’s gift, so He can give it and take it away; if a man should lose the Beatific Vision, he would either go insane or die from sorrow: such is how beautiful God’s Face is. Now, because Jesus is God and Man, He enjoyed the Beautific Vision since the instance of His conception. Now, when a man enjoys seeing God, he sees him to a certain limit; he sees God to the extent that his intellect can comprehend God. Hence, in the womb, Jesus would comprehend God as much as an unborn child could, and, when He was twelve years old, He would comprehend God as much as a twelve year old child could, and so on and so forth. The union of the Divine Nature and Human Nature in Jesus meant Jesus, as Man, could not sin, in light of Him seeing God face-to-face as Man, as I said before. The flip side of the Beatific Vision is that Jesus, as God, communicated Himself to the Man, giving Him all of His graces, powers, and love, to the point that Jesus’ human nature resembled God, i.e., the Visible made known the Invisible. Jesus’ human nature is what God looks like as Man, and, Jesus’ human nature is what Man looks like when He is fully conformed to God, all-holy, united to the Divinity.
The union of the Divine and the Human is a result of the Incarnation, that mystery by which God became incarnate in the womb of Mary. He assumed humanity, all human narture - He assumed your body and soul, your sins and virtues, your life and all, and He assumed my body and soul, my sins and virtues, my life and all, and He assumed the bodies and souls, sins and virtues, lives and all of every human person He has created in history - whereby Jesus is the sum of the human race: In Him is every human person, including the person of His Mother, Mary. Because of this, Jesus is the New Adam. Just as Adam was the father of humanity, and had within himself all humanity, so too, Jesus is the New Father of humanity, having within himself all humanity; but Jesus’ Fatherhood is greater than Adam’s, because, Adam did not have Jesus in himself, but Jesus had Adam in Himself. God took on human flesh because He wished to redeem mankind by dying on a cross, and, by such a sacrifical act, He showed His love for mankind. Now, God, strictly speaking, cannot actually die or be harmed, given His Nature, but, by taking on human nature, He can suffer and die, in the humanity that is, since mortal man is vulnerable to suffering and death (in light of original sin). Because Jesus is sinless, He was completely conformed to God, whereby His Human Will fully submitted itself to His Divine Will, so that, in His Humanity, He did whatever God commanded; because of this, and because Jesus is God, we say that, whenever Jesus spoke, it was God speaking, and whenever He acted, it was God acting, and whenever He suffered, it was God who suffered, and when He died, it was God who died.
A few questions you might ask, which I’d like to answer briefly:
Dose Jesus have a God? Yes, as Man. As Man He was a Jew, and Jews worship God.
Dose God have a body? Yes, in light of the Incarnation.
Did God have a body before the Incarnation? No, since God is not physical. He is Spirit.
Did God foreknow Adam would sin? Yes, and He gave Adam free-will, just as He gave the angels free-will; some of the angels rebelled against God, but He permitted it, for a greater good. The same goes for Adam.
Why didn’t God create a world free of evil? God created everything free of evil, He created everything good - so good, in fact, that men and angels had the good of free-will. But God knew they would abuse their free-wills, and cause evil to come into the world, so He ordered things in such a way that good would come out of evil, ultimately defeating evil.