Carl Jung spotted the distinction between introverts and extroverts in 1921. Tests such as the Myers-Briggs Type Indicator show that about one third and a half of the population are made up of introverts.
From interviewing many people in the tech space and working in it for many years, I believe we can make an assumption there is an over representation of introverts, especially within the technical roles themselves. Not to say that everyone in tech is an introvert, far from it. Yet, anecdotally at least, it seems introverts are drawn to coding.