Mentoring taught me more than it taught them
A junior developer once asked me why we use dependency injection. I gave the answer I had learned: testability and loose coupling.
They nodded. Then they asked, "But why does that matter?"
I didn't have a good answer.
I had used the pattern for years. I knew when to reach for it and could explain the accepted benefits. Their second question exposed how much of my explanation I had inherited without examining it.
That happens often in mentoring. A junior developer asks a question that sounds obvious, and I discover that my answer rests on another idea I haven't properly explained. They haven't yet learned which questions experienced people tend to skip. I hope they never do.
Trying to teach someone also makes me inspect decisions that have become automatic. Why this abstraction? Why this boundary? What would actually go wrong if we chose the simpler option? Sometimes I find a clear reason. Sometimes I find habit wearing the clothes of expertise.
I wouldn't be where I am without people who took time to explain their thinking to me. I try to pass that on. The nice surprise is that the explanation still works in both directions.