The idea that teaching is something that invariably and inexorably damages ones research and study prospects to be entirely opposed to my actual experience.
Some teaching experiences are nothing but time sinks that devour otherwise productive periods and leave you no closer to having finished, or produced interesting work. But the same can be said for some research experiences.
There are some definitive pros I found to teaching. First, it provided a second pass at material I thought I "knew", but now had to know inside and out. That was eye opening, to say the least. It afforded me more time to interact with the professor who was teaching the class, and gave me a framework where I was immersed in a topic - said immersion ended up in me adapting some things about my dissertation to a particular class topic I now knew really well.
It also teaches you to teach, and while generally an undervalued skill in academia compared to research, it's both something you should probably know, and does train you for some research oriented problems - how to give a new grad student in your lab a rundown of the topic, how to answer questions off the cuff during talks. How to give talks meant to convey information instead of a summary of results.