Some basic truths from the Scriptures, and some simple words from a finite mind for your contemplation.
“For I am the LORD, I change not; therefore ye sons of Jacob are not consumed.” (Malachi 3:6) “Let no man say when he is tempted, I am tempted of God: for God cannot be tempted with evil, neither tempteth he any man.” (James 1:13)
Jesus Christ is God, what theologians call the second person of the Triune Godhead. “Then was Jesus led up of the Spirit into the wilderness to be tempted of the devil.” (Matt. 4:1)
The Lord has never changed, I do not like to use the phrase “God cannot,” “but with God all things are possible.” (Matt. 19:26) Yet God, Jesus Christ in the flesh, at least in the wording of the Scriptures, was able to be tempted, “For we have not an high priest which cannot be touched with the feeling of our infirmities; but was in all points tempted like as we are, yet without sin.” (Heb. 4:15)
The Almighty is Omniscient, He knows everything, “Neither is there any creature that is not manifest in his sight: but all things are naked and opened unto the eyes of him with whom we have to do.” (Heb. 4:13) So then, here is the contemplation section for you, since the Lord knows everything, He already completely and totally understood our temptations before the Lord Jesus arrived in the flesh, it was not necessary for Him to take on the form of a man, to be made a little lower than the angels (Heb. 2:7) to experience that, He understood perfectly all of every possible temptation every man could ever experience, we were after all made by Him, He is after all everywhere all the time. “Whither shall I go from thy spirit? or whither shall I flee from thy presence?” (Psalm 139:7)
He does not change, and He cannot be tempted, so how do we consider these verses in context without lowering the Lord Jesus Christ in the flesh to less than who He is, Creator and Sustainer of all that exists, Holy, Righteous and the only One worthy of praise.
It does no good to say that He “left behind” in heaven any of His attributes or powers, that again would state that God can modify Himself as less than what He is, an impossibility, the miracles of healing, of stilling the raging sea, of casting out demons, everything that He did cries out to us that God Himself was among men in the flesh. God cannot be tempted, yet He went into the wilderness to be tempted.
If you believe that if you read to the end of this short letter that I am going to give you an answer to this contemplation, then it would be best to stop here, for neither I nor any man who has ever been born has the answer, it is far above the ability of anyone but God to provide. It is one of those items from the Word of God that if the wicked were to approach you with it and say, “See, here is a contradiction in the Bible, give me an account of it,” your reply would need to be, “I don’t know, but faith in Christ tells me it is true.”
Many thousands of pages have been written on this subject matter, many God-fearing men claim to have an answer for it, but I believe the wise man has contemplated it, professed a humility in his heart to be unable to fully grasp it, said, “Thy will be done,” and moved on in the work that the Lord has laid before him. The doctrine of election, predestination, why the Lord made Lucifer in the first place, much less why He will release him for a season towards the end of the Millennial Period, why David was not stoned after his actions with Bathsheba and the child died instead, why Zachariah was unable to speak after asking a question of the angel concerning the birth of John the Baptist, yet Mary was not?
“For my thoughts are not your thoughts, neither are your ways my ways, saith the LORD.” (Isaiah 55:8)
Don’t try to figure out how to think like God thinks, it is impossible for the finite to understand the infinite. “And without controversy great is the mystery of godliness: God was manifest in the flesh, justified in the Spirit, seen of angels, preached unto the Gentiles, believed on in the world, received up into glory.” (1 Tim. 3:16) God Himself while in the flesh was able to be tempted, believe that in faith, contemplate it, and then get back to work.