In my experience, it's the act of writing for someone else that makes me learn the most. It helps clear out the assumptions I had which I had been satisfied with but didn't actually have the evidence for. When writing for myself, I don't think about the assumptions as much, but when writing for others they become a lot more evident to me.
I can't speak for everybody, but it's different for me if there's a chance somebody can read it. I have notebooks offline, too, that nobody will ever see, but they don't get the same fine-toothed comb treatment.