That's right. I think writing a blog is definitely a great way to learn new things. When you write an article or a tutorial you do extensive research on the topic. This unlocks various aspects of the topic and forces you to ask tough questions to yourself.
I used to run my own blog (htmlxprs.com) few years back and before writing anything I used to make sure that I understood the topic perfectly. Then I would proceed with writing. I also used to blog actively on SitePoint and it felt great to reach out to so many people and teach them something you understand the best.
Once you write something and publish it, people will start giving their opinions and even try to correct you in case you are wrong somewhere. The community is always helpful. You will occasionally come across haters/trolls etc but that's okay. You need to take constructive feedback from others and improve yourself.
So, go ahead blog something. I can confirm it's one of the best ways to learn things.