IBS Hebrews 5:8
"Though He were a son, yet learned He obedience by the things which He suffered"
The previous verse says "who in the days of his flesh, when he had offered up prayers and supplications with strong crying and tears unto him that was able to save him from death, and was heard in that he feared" which I think is referring to the garden of gethsemane, where Jesus obeyed the will of the Father despite the suffering Jesus was enduring at the time and would endure in the future. According to these verses and my own experience, I think learning obedience is only or at least mostly possible in circumstances where we suffer. We live in a fallen world, and we our selves are fallen, we are prone to sin, therefore obeying God, not sinning, will cause suffering.
Christ had the choice of going on with the crucifiction or not, according to Christs prayers in that moment, he did not feel like being crucified but it was his will for the Fathers will to be done, and so he obeyed. We also have the ability to choose, but we are inclined to choose sin, so learning obedience to God will cause suffering, because it is against our fallen nature.