Hebrews 5:8 says of Jesus: “Although He was a Son, He learned obedience from the things which He suffered.” “In the days of His flesh” (:7) Jesus suffered many things, “learned obedience” (:8) and became “perfect” (:9). Jesus was, of course, in His nature perfect already, but He had never faced and overcome sufferings and temptations in a physical body before. So there is a sense, the Bible indicates here, in which He “learned obedience” by perfectly facing everything He endured.
There is an application for those of us who are following Christ also.
If it can be said of Jesus Himself that “He learned obedience from the things which He suffered”, how much more can it be said of US, who do NOT have perfect natures, and who have so much to learn? Certainly we can see how we have so much to learn through suffering too. So let us not “waste” the lessons our suffering has to offer, under the direction of a Heavenly Father who is good and does good; who loves us, and who is working all things after the counsel of His will. Rather let us purpose that in our sufferings, we will show ourselves to be sons of God by “learning obedience” – and thus follow in the steps of the perfect Son of God who did the same.