That is Catholic doctrine but is debatable if we are going by scripture alone. Scriptures suggest he may not have been perfect before his death and may have been disobedient before he turned thirty years of age. Three things:
- The Son of Man had to "Learn obedience through what he suffered" suggesting he wasn't always perfect when he was alive and may have needed 33 years to grow and learn obedience. He wasn't tested in the wilderness when he was 14 but when he was 30 or so. He wasn't baptized by John until then, either. Little was told of his early life except that he was very good with scripture analysis and that he didn't grasp why his parents were so slow. In other words had he been tested in the wilderness at age 14 he might not have obeyed his Father's will. Possibly he was tested before and failed, and that would be disobedience to a parent -- breaking one of the 10 commandments.
- Hebrews specifically states he was made perfect only when he died.
- There is more than one kind of sin made confusing by semantics and Greek language. It can refer to disobedience, to ignorance, to disease, to weakness, to murders, thefts, thoughts, intentions, desires, sins of neglect. 'Sin' is not one thing but appears that way do to the Greek casual expression. Language also causes confusion. Just as English can't express the 4 love's of Greek language, Greek cannot express the various terms that it fuses into 'Sin'.
The Scriptural Doctrine is that God became a man Jesus Christ, was tempted in every way yet without sin, as a man He had to learn obedience by the things He suffered doesn’t mean He wasn’t perfect but He experienced humanity and was found without sin and no deceit in His speech. We also have an example when He was a young man, He made quite an impression. Your views don’t line up with the Scriptures.
“And the child grew and became strong, filled with wisdom. And the favor of God was upon him. Now his parents went to Jerusalem every year at the Feast of the Passover. And when he was twelve years old, they went up according to custom. And when the feast was ended, as they were returning, the boy Jesus stayed behind in Jerusalem. His parents did not know it, but supposing him to be in the group they went a day’s journey, but then they began to search for him among their relatives and acquaintances, and when they did not find him, they returned to Jerusalem, searching for him. After three days they found him in the temple, sitting among the teachers, listening to them and asking them questions. And all who heard him were amazed at his understanding and his answers. And when his parents saw him, they were astonished. And his mother said to him, “Son, why have you treated us so? Behold, your father and I have been searching for you in great distress.” And he said to them, “Why were you looking for me? Did you not know that I must be in my Father’s house?” And they did not understand the saying that he spoke to them. And he went down with them and came to Nazareth and was submissive to them. And his mother treasured up all these things in her heart. And Jesus increased in wisdom and in stature and in favor with God and man.”
“For to this you have been called, because Christ also suffered for you, leaving you an example, so that you might follow in his steps. He committed no sin, neither was deceit found in his mouth. When he was reviled, he did not revile in return; when he suffered, he did not threaten, but continued entrusting himself to him who judges justly. He himself bore our sins in his body on the tree, that we might die to sin and live to righteousness. By his wounds you have been healed. For you were straying like sheep, but have now returned to the Shepherd and Overseer of your souls.”
1 Peter 2:21-25 ESV
“Since then we have a great high priest who has passed through the heavens, Jesus, the Son of God, let us hold fast our confession. For we do not have a high priest who is unable to sympathize with our weaknesses, but one who in every respect has been tempted as we are, yet without sin. Let us then with confidence draw near to the throne of grace, that we may receive mercy and find grace to help in time of need.”
Hebrews 4:14-16 ESV
“For every high priest chosen from among men is appointed to act on behalf of men in relation to God, to offer gifts and sacrifices for sins. He can deal gently with the ignorant and wayward, since he himself is beset with weakness. Because of this he is obligated to offer sacrifice for his own sins just as he does for those of the people. And no one takes this honor for himself, but only when called by God, just as Aaron was. So also Christ did not exalt himself to be made a high priest, but was appointed by him who said to him, “You are my Son, today I have begotten you”; as he says also in another place, “You are a priest forever, after the order of Melchizedek.” In the days of his flesh, Jesus offered up prayers and supplications, with loud cries and tears, to him who was able to save him from death, and he was heard because of his reverence. Although he was a son, he learned obedience through what he suffered. And being made perfect, he became the source of eternal salvation to all who obey him, being designated by God a high priest after the order of Melchizedek.”
Hebrews 5:1-10 ESV
So yes He was made perfect not meaning He was imperfect otherwise He would’ve been like the other priests who had to offer a sacrifice for their own sin but since Jesus Christ was sinless and perfect, He is able to provide eternal salvation for us.