It's a myth that teaching something is the best way to learn. Rather, being able to teach something is an excellent measure of your understanding of it, and the act of teaching forces you to reframe your knowledge in ways you may not have tried before, exposing gaps in your knowledge.

Like everything else, teaching is a tool.