To understand Hebrews 5:7, you must read the entire book of Hebrews, and read it as if you were a Jew and this letter was addressed to your cultural viewpoint, for that is exactly how the book was written.
The book is written in the backdrop of the high priestly role.. which for the Jews was the most important role in their religion.. it was the high priest who only could enter the Holy of Holies in the Temple and offer the atonement.. He was the divinely appointed intermediary between sinful man and a holy God.
Qualifications for this role are seen in chapter 4 of Hebrews and this is carried through into chapter 5:1-10. Vs 1-4 state that
1. He is selected from amongst men
2 He is appointed to represent them in matters relating to God
3 He is to offer sacrifices and gifts for sins
4. He is to deal gently with those who are ignorant and going astray as he is subjec to their weaknesses
5. He offers sacrifices for his own sins, as well as the sins of his people.
The coming Messiah was to be a priest who would fulfill all the qualifications of the Law and would infact fulfill it once and for all.
Read Gen 14:18, Exodus 28, 29, Zechariah 6:12-13
Hebrews 2:14-18 describes the way that Jesus fulfilled the requirements of the High Priestly office
1. He shared in their humanity
( and is the reason why he is called Son of Man throughout the NT and not Son of God)
vs 17
For this reason, he had to be made like his brothers, in every way, in order that he might become a merciful and faithful high priest in service to God, and that he might make atonement for (literally turn away the wrath of God, taking away ) the sins of the people.
Vs 18
Because he himself suffered when he was tempted, he is able to help those who are being tempted.
Hebrew 5:7 just shows that in His humanity, Jesus had to be tempted in every way we were.. yet he was with out sin.
Now look at John 8:54, Psalm 2:7 and especially Psalm 110:4
The Old Testament High Priest never had the assurance of sins forgiven.. year after year he went into the Holy of Holies to offer sacrifice. Hebrews 7:11 states the reality though
" if perfection could be attained through the Levitical Priesthood (for on the basis of it, the Law was given to the people), why was there still need for another priest to come - one in the order of Melchizedek. For when there is a change of Priesthood, there must always be a change of law.
(Read the rest of the chapter)
to understand 5:7 you also need to read Hebrews 7 ...
Jesus became the God-Man... fully Man and Fully God. Only as fully man could he provide the final and only permanent sacrifice for the sins of man. and in Hebrews 5:7 we see how he fulfilled all the requirements of the Law to be the High Priest of God in the order of Melchizedek.
He was also Fully God.. for though He became a Man, he did not and could not lay aside His Deity. (read John 1:1-14 though discussion on the deity of christ is outside the limits of this post).
Hope this helps and answers the question???
Carol