Well, first of all, let's briefly discuss the process of thinking.
Lone, silent thinking is the internalization of words taught to you at a very young age. Clinical literature suggests that if you miss learning period you cannot learn it anymore. Feral Child Wikipedia
Speculation: Based on this, I strongly believe that understanding words and speaking came earlier in our evolutionary process than thinking. This posits the idea that we're better at discussing things in social settings than thinking them internally.
Now, writing obviously came later than understanding words, speaking words and thinking, however, it is a bit different than thinking. When you are writing you externalize something within and actually look at it, which entirely changes the perception of the subject.
Also, to further my point. As I mentioned above, thinking is the internalization of a conversation and it is really hard to think properly because it requires you to activate different parts of your personality that can actually argue/communicate as you would in a normal conversation. Technically speaking in order to think properly you need to create a cognitive dissonance otherwise it is going to be confirmation bias.
It's also useful to bring in terms such as subconscious and conscious. Carl Jung thought that those two exist 'in different dimensions'. You can attribute symbolic and metaphorical aspects of your psyche to the subconscious, while the verbal aspect of your mind is conscious. In other words, there is a difference between unarticulated and articulated knowledge.
Unarticulated knowledge is somewhat subconscious, so you do not have full access to it, however, if you manage to articulate it - you gain full access. Thinking is a quick process and thoughts might slip away while writing is slower and you actually perceive, correct yourself and rectify the issues as you go through. (Same applies to the communication except there are two or more heads instead of one.)