Every teacher has this experience.
It usually occurs during the first year of teaching. I hear them saying it all the time. "I never knew this (content) so well until I had to teach it." "I understand this content so much better now--as a teacher--than I ever did as a student."
There is actually a lot of research behind this idea that "doing" and "teaching" helps students (and adults) to learn, understand, and retain information. And it makes sense too.
As much as (some) teachers would prefer that their students learn merely by listening, the data suggests that very few students (and adults) learn solely by listen. The best learning occurs when students can combine what they've heard with what they see and what they are asked to do. Learning comes from struggling with concepts, asking questions, discovering answers, discussing ideas with other learners. The best learning comes from "doing".
If this is true for adults, then it is true for students too. An active classroom is a learning classroom. Teachers that are able to create an atmosphere in which students are willing to ask questions and pose ideas tend to have better student outcomes that those that can't (or won't).
From a teacher's perspective, the best teachers are constantly learning new things about their subjects. This is the deep understanding that comes from building on previous understandings. Teachers aren't finished learning when they complete their college degree requirements. Teachers continue to learn and to improve.
Teachers are lifelong learners!