People like to teach for many reasons, I can try and point out some of the more obvious ones.
1. The need to exercise authority over others, to be admired by others. Standing in front of an audience of students and bestowing knowledge upon them can be intoxicating. Even if you just transfer knowledge without adding anything new to it, which is the case with most teachers, the fact that people are seriously writing down what you're saying flatters the ego, and you can easily forget that you're just a medium, you feel like the creator of that knowledge.
2. There is an act of creation in teaching, in the way that Socrates defined creation in the Symposium: not engendering others, but engendering ideas in others.
3. Teaching is the best way to learn. In order to efficiently transfer your knowledge, you have to organize it. And then, while preparing for giving a lecture or a lesson, you realize how fuzzy and missing it actually is, and you try to clarify it to yourself, fill all the pores. And then there is the act of speaking, of repeating, which solidifies it. So the only subjects I can really say I understand are the ones I taught to others.