In Hebrews we learn “because he himself [Jesus] suffered when he was tempted, he is able to help those who are being tempted” (2:18 NIV). In Hebrews we also read that Jesus “learned obedience from what he suffered” (5:8 NIV). Yes, it says that Jesus learned something. Interestingly, the epistle also talks about the Son of God being “made perfect” forever (7:28). At first glance it might seem that Jesus was lacking something, that he didn’t know something, that he wasn’t perfect. I like how Geerhardus Vos discussed this:
…the “perfecting” of the Savior, which is made so prominent in the Epistle, has two sides: [first:] it is perfecting in the sphere of sympathy with exposure to temptation and [second] perfecting in the sphere of appreciation of obedience which overcomes temptation. In both respects the perfecting is an ethical process, since it took place by means of an ethical experience through which the Savior passed: He became acquainted with the force of temptation and learned the practice of obedience.
But so far as the notion of τελείωσις [perfection] in itself and from a formal point of view is concerned, the Epistle does not know this as an ethical but as an official conception. The term nowhere designates that Jesus was made ethically or religiously perfect, that His character was developed in either sense; it always designates that His qualifications for the high-priestly office were perfected, that He received the full-orbed equipment which His priestly ministry requires. The subject of the τελείωσις [perfection] is always the priest, never the man. That the means through which the τελείωσις [perfection] of the priest takes place lie in the moral sphere cannot alter this conclusion in the least. The author has nowhere said, and hardly would have said, that in His moral or religious character Jesus was made perfect.