Writing code and writing documentation are completely linked, if you can’t do one, you probably can’t do the other.
There’s a difference between having/understanding an idea and being able to express it in different modes/mediums of communication (in this case, to computers vs to humans). I’m not saying that one can’t learn to be better at a form of communication, but I recognize they are different abilities.