I don't doubt that ADHD exists so much as I suspect that it is wildly overdiagnosed in the U.S. Every other developed country has much, much lower rates of diagnosis than the U.S., but even in countries like France where there is a cultural inclination to find diagnoses or interventions other than an ADHD diagnosis, there are still ADHD diagnoses (at a rate that is a few percentage points of the US diagnosis rate).
The main treatment for ADHD is of course lifelong amphetamine prescriptions, and the US has a private pharmaceuticals industry very happy to market to insecure parents. And a general American insecurity about education that results in an astonishingly high proportion of elementary schoolers who get no or minimal recess at all.
The single biggest risk factors for an ADHD diagnosis are being male and being in the youngest quartile of your classroom. This is something we have managed to pathologize.
I've known quite a few people who would snort adderall and other amphetamines-based analogs as a study drug - they reported being able to remember things better, and to get into a single-minded, grinding mindset that sounds a lot like what we programmers strive to achieve as flow. Various mathematicians (notably Erdos) have used amphetamines as a nootropic.
As a counter thought experiment, what if we are giving amphetamines to one subset of the population at a much higher rate than the other, and these drugs act as a force-multiplier for effort directed towards flow-dependent activities, like programming, science, and mathematics?