Every good teacher you had in your life knew much more than the level at which they taught you. You can't teach effectively if you don't master flawlessly the subject you teach. You achieve that level by going way beyond what students learn.
At the basic education levels, this is easy to achieve. At the University level, you can only guarantee this elastic push by heading into research.