God is Light and Love (1 John 1:5; 4:8). He "dwells in unapproachable light" (1 Timothy 6:16). Because He is holy, He calls us also to be holy.
But holiness, for a human being, can come only through temptation. Adam was created innocent, without even the knowledge of good and evil. God wanted him to be holy; and for this, God allowed him to be tested.
The tree of knowledge of good and evil had been created by God Himself and was not evil in itself. It existed in a world over which God pronounced the words, "Very good" (Genesis 1:31). It was very good, because it afforded Adam the opportunity to be holy, by resisting temptation.
The Bible says, "Consider it all joy when you encounter various temptations" (James 1:2), because temptations give us the opportunity to partake of God's holiness (Hebrews 12:10) and become "perfect and complete" (James 1:4).
As we look at the holiness of Jesus, we do not look at that inherent holiness that He had as God, for that would be no example for us. We look at Him as one "made like His brethren in all things" and "tempted in every respect as we are, yet without sinning" (Hebrews 2:17; 4:15).
Jesus is our Forerunner (Hebrews 6:20), Who ran the same race that we have to run, paving the way for us to follow. And so He says to us, "Follow Me" (John 12:26). And looking unto Him Who has run the race ahead of us, we too can run with endurance, without fainting or losing heart (Hebrews 12:1-4).
Jesus endured every temptation that can ever come to any man. He was tempted "in every point, as we are". This is clearly taught in Hebrews 4:15. And this is our encouragement. Jesus exercised no power that is not offered to us by God today. He met and overcame temptation, as a man, in the strength given to Him by His Father through the Holy Spirit.
Satan has always told man that God's laws are burdensome and impossible to be obeyed. Jesus came as a man and exposed that lie of Satan by His life of perfect obedience. If we had any temptation to overcome, or any command of God to obey, that Jesus did not face, then on that point we could have an excuse for sinning. And if Jesus had lived that perfect life, without the weakness of our flesh or with power unavailable to us, then His life could not be an example that we could follow, nor could it be an encouragement to us in the moments when we are tempted. But Jesus demonstrated through His life as a man on earth, that the power God makes available to us is sufficient to meet the demands of His law that we see in His Word.
We do not have a High Priest Who cannot sympathize with our weakness, but one who has been tempted in all things as we are (Hebrews 4:15).
The sinless life of Jesus is God's demonstration to the world that it is possible for man through the power of the Holy Spirit to have full victory over sin and to obey God joyfully. If we abide in Him, we CAN "walk even as He walked" (1 John 2:6).