“Although he was a son, he learned obedience through what he suffered” (Hebrews 5:8 ESV).
“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.”
(John Piper, Fifty Reasons Why Jesus Came to Die [Wheaton: Crossway, 2006] p. 25).
The rest of the above referenced book can be downloaded for free as a PDF. This book makes a great devotional for daily Lenten meditations.