The titular question is important to answer because it may affect how we teach coding. Neuroscientists at MIT attempted to answer the question.
Since coding can be learned as an adult, they figured it must rely on some pre-existing cognitive system in our brains. Two brain systems seemed like likely candidates: either the brain’s language system, or the system that tackles complex cognitive tasks such as solving math[s] problems or a crossword. The latter is known as the "multiple demand network."
They hooked people up to an fMRI machine and watched their brains as they attempted to solve coding problems.
Their results showed that the language part of the brain responded weakly when reading code (the paper’s authors think this might be because there was no speaking/listening involved). Instead, these tasks were mostly handled by the multiple demand network.
But apparently only parts of the multiple demand network are activated and, notably, not the parts that process maths or logic problems. Coding therefore appears to be its own distinct process.
The thing is, a similar Japanese study found:
… that activity in brain regions associated with natural language processing, episodic memory retrieval, and attention control also strengthened with the skill level of the programmer.
This suggests to me that coding skills are distributed quite widely across the brain.
I wonder where the guesswork part of the brain is because I'm sure that was the part activated in my brain for most of my coding career.