References: Hebrews 5:8, 2:10
Therefore, when the Bible says that Jesus “learned obedience through what he suffered,” it doesn’t mean that he learned to stop disobeying. It means that with each new trial he learned in practice—and in pain—what it means to obey. When it says that he was “made perfect through suffering,” it doesn’t mean that he was gradually getting rid of defects. It means that he was gradually fulfilling the perfect righteousness that he had to have in order to save us.
The point is this: If the Son of God had gone from incarnation to the cross without a life of temptation and pain to test his righteousness and his love, he would not be a suitable Savior for fallen man. His suffering not only absorbed the wrath of God. It also fulfilled his true humanity and made him able to call us brothers and sisters (Hebrews 2:17).
Jesus being made perfect is probably one of those mysteries we shan’t understand this side of eternity.