This is so true. You never understand a subject as thoroughly as you do after you've taught it. The act of distilling what you know and determining how to explain it clearly to others is as good for you as it is for them.
Also, you have to learn a lot more than you actually teach in order to be ready for a range of possible questions.
To learn, teach.