We will answer the question according to the following hypotheses:
Jesus was guided in his teaching and ministry by the Spirit of God primarily, but the scope of the revelations to the Prophets by that same spirit is such that the ministry of Messiah was to reiterate, elucidate, and show complete that corpus of revelation, so that the teachings of Messiah are not new, and that the writings of the Law and the Prophets are not the foundation of the teaching, but that the teaching of Messiah and the teaching by the Spirit manifest in the Law and the Prophets are indeed the selfsame with regard to message and source.
Jesus is the very fullness of God in bodily form, and did not choose or venture to become a spiritual teacher, nor was he merely a spiritual teacher, but the very Word of God, who was with God in the beginning, made flesh to dwell among men, so that the dark places in the hearts of all men might be illuminated by the Father of Heavenly Lights and as that Word, with God in the beginning, has been instructing men in holiness by the Spirit since the beginning.
The phrases you have quoted really say two things: Messiah's teaching comes from God, and You must believe in messiah to be saved from sin.
My doctrine is not mine but his who sent me. I do what my father taught me.
The Scriptures have always shown that God himself would teach his people. Messiah is the fulfillment of that word. When Messiah teaches, the doctrine he teaches is the very word of God. The people of Judea were well familiar with this and expected the Messiah to be their teacher. When Messiah speaks to the woman at the well (John 4), she says to him, “I know that Messiah is coming. When he comes, he will tell us all things.” Jesus said to her, “I who speak to you am he.”
Now therefore go, and I will be with your mouth and teach you what you shall speak.
I will instruct you and teach you in the way you should go;
I will counsel you with my eye upon you.
For the Lord gives wisdom;
from his mouth come knowledge and understanding;
he stores up sound wisdom for the upright;
he is a shield to those who walk in integrity,
guarding the paths of justice
and watching over the way of his saints.
“Come, let us go up to the Mountain of the Lord,
to the house of the God of Jacob,
that he may teach us his ways
and that we may walk in his paths.”
Give ear, and hear my voice;
give attention, and hear my speech.
Does he who plows for sowing plow continually?
Does he continually open and harrow his ground?
When he has leveled its surface,
does he not scatter dill, sow cumin,
and put in wheat in rows
and barley in its proper place,
and emmer as the border?
For he is rightly instructed;
his God teaches him.
The Lord God has given me
the tongue of those who are taught,
that I may know how to sustain with a word
him who is weary.
Morning by morning he awakens;
he awakens my ear
to hear as those who are taught.
The Lord God has opened my ear,
and I was not rebellious;
I turned not backward.
I gave my back to those who strike,
and my cheeks to those who pull out the beard;
I hid not my face
from disgrace and spitting.
All your children shall be taught by the Lord, and great shall be the peace of your children.
And no longer shall each one teach his neighbor and each his brother, saying, 'Know the LORD,'for they shall all know me, from the least of them to the greatest, declares the LORD.
He changes times and seasons; he removes kings and sets up kings; he gives wisdom to the wise and knowledge to those who have understanding;
He who believes in me as the scriptures say will not die in his sin. Verily, if you don't believe I am he, you will die in your sin.
The Scriptures have always shown that it is belief in the Cornerstone, who is the Stumbling Block by which salvation comes. The ones who reject the Cornerstone stumble and fall into to darkness. They are wicked, and they will not stand in the judgement.
This is the gate of the Lord;
the righteous shall enter through it.
I thank you that you have answered me
and have become my salvation.
The stone that the builders rejected
has become the cornerstone.
This is the Lord's doing;
it is marvelous in our eyes.
This is the day that the Lord has made;
let us rejoice and be glad in it.
Those who trust in the Lord are like Mount Zion,
which cannot be moved, but abides forever.
But the Lord of hosts, him you shall honor as holy. Let him be your fear, and let him be your dread. And he will become a sanctuary and a stone of offense and a rock of stumbling to both houses of Israel, a trap and a snare to the inhabitants of Jerusalem. And many shall stumble on it. They shall fall and be broken; they shall be snared and taken [...] and they will be thrust into thick darkness.”
therefore thus says the Lord God,
“Behold, I am the one who has laid as a foundation in Zion,
a stone, a tested stone,
a precious cornerstone, of a sure foundation:
‘Whoever believes will not be in haste.’
Behold, I send my messenger, and he will prepare the way before me. And the Lord whom you seek will suddenly come to his temple; and the messenger of the covenant in whom you delight, behold, he is coming, says the Lord of hosts. But who can endure the day of his coming, and who can stand when he appears? For he is like a refiner's fire and like fullers' soap [...]. Then I will draw near to you for judgment. I will be a swift witness against the sorcerers, against the adulterers, against those who swear falsely, against those who oppress the hired worker in his wages, the widow and the fatherless, against those who thrust aside the sojourner, and do not fear me, says the Lord of hosts.
What doctrine or scripture might have caused Jesus to become a spiritual teacher to forgive sin and speak about knowledge of the soul?
It is an error to say "these passages caused Jesus to become a teacher." These passages do, however, show that the Messiah that was to come, and has now come, would be a wise teacher, and not just that but the Teacher, who brings complete knowledge of God. They should be considered supplementary to the passages above that address the source of Messiah's doctrine.
The law of the Lord is perfect,
reviving the soul;
the testimony of the Lord is sure,
making wise the simple;
the precepts of the Lord are right,
rejoicing the heart;
the commandment of the Lord is pure,
enlightening the eyes;
There shall come forth a shoot from the stump of Jesse,
and a branch from his roots shall bear fruit.
And the Spirit of the Lord shall rest upon him,
the Spirit of wisdom and understanding,
the Spirit of counsel and might,
the Spirit of knowledge and the fear of the Lord.
Out of the anguish of his soul he shall see and be satisfied;
by his knowledge shall the righteous one, my servant,
make many to be accounted righteous,
and he shall bear their iniquities.
For the earth will be filled
with the knowledge of the glory of the Lord
as the waters cover the sea.
Pope John Paul II writes, even in agreement with many Protestants, that belief and wisdom go hand-in-hand:
A rich tradition of wisdom literature permeates the Old Testament. On the human level, it manifests the thirst of every person to make sense of the various experiences of daily existence and to direct one's life in the most profitable and worthwhile way. From this point of view Israel did not depart from the forms of wisdom found in other cultures of antiquity. It elaborated its own wisdom of life which embraced the various sectors of existence: individual, family, social and political.
This search for wisdom, however, was never separated from faith in the Lord, the God of the Exodus. This was due to the fact that for the Chosen People, perfect wisdom is to be found in God alone. For this reason the "fear of the Lord," the religious and vital orientation toward him, was regarded as the "principle," the "foundation," the "school" of true wisdom (Prov 1:7; 9:10; 15:33).
Indeed, as the teacher says, "The fear of the LORD is the beginning of wisdom, and the knowledge of the Holy is understanding."