Hebrews 5 v.8:
Although he was a son, he learned obedience through what he suffered.
How can it be that Jesus, who never sinned and never disobeyed, learned obedience?
The Bible is consistent and clear that Jesus, though he was fully human and tempted in all the same ways that we are, never gave in to sin. Through all temptation, Jesus acted in perfect relation with the father, fully loving him and not disobeying him, as he has and will for all eternity.
So, when the Bible talks about learning obedience through what he suffered, it doesn't mean that he learnt to stop disobeying. Rather it meant that with each new act of obedience, with each new trial he faced, he learnt what it means in practice - in all the pain that that involves - what it means to obey.
'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 Saviour for fallen man.' Jesus, in suffering, learnt what it means to be truly human, and yet through obedience he was being prepared to be an appropriate sacrifice for fallen humanity.