Mormons believe Joseph Smith to be a prophet in the sense that Abraham, Moses, Noah, and others all were. Jesus Himself appointed teachers He called apostles like Peter, James, and John. Joseph Smith is viewed pretty much the same way.
11 And he gave some, apostles; and some, prophets; and some, evangelists; and some, pastors and teachers;
12 For the perfecting of the saints, for the work of the ministry, for the edifying of the body of Christ:
13 Till we all come in the unity of the faith, and of the knowledge of the Son of God, unto a perfect man, unto the measure of the stature of the fulness of Christ:
14 That we henceforth be no more children, tossed to and fro, and carried about with every wind of doctrine
So, to answer your question:
Yeshua says that he is our only teacher. Why do Mormons believe that Joseph Smith is necessary to teach us?
For the same reason that other prophets and apostles were necessary to teach us. They act as the Lord's spokesmen here on the earth, and they teach the doctrine of Christ.
You bolded this part of the cited scripture:
And call no man your father upon the earth:
So it's worth clarifying that Mormons do not call or consider Joseph Smith as their father. Just a prophet.
Expansion of original answer as to Joseph's importance: Joseph Smith did have the unique calling to restore Christ's doctrine to the Earth in its fulness. Mormons teach about Joseph Smith simply because, if the account of Joseph Smith--and by extension, the Book of Mormon--is true, then so is the rest of what the Church teaches. All members and prospective members of the Church are asked to pray about the truthfulness of these things so that they can know for themselves. Except for this crucial bit of history and the role it plays in conversion to the fulness of Christ's gospel, Joseph Smith is no more than a prophet and teacher.