Thats a very good question. There does appear to be outside influences that might also lead to adhd symptoms - like pesticides. But the overwhelming amount does seem to be genetic. Problem is that it might be the uncle that had it, or a parent that had it and nobody realized it. Basically as a child if you had adhd before about 1980 ish - unless it was a really hyperactive state of adhd - it probably was not going to be diagnosed. If you were an adult with adhd or add in any time before 1980 or even 1990, it was not going to be diagnosed. So when you say it can be just random......well, it probably was not. It just was difficult to trace it back.
Often times it runs through families like it does in mine, but other times it can just be random, I mean the gene has to start somewhere right?
I just saw this. Its a book aimed at the 5 to 10 year old age group. Is, "is an appealing and truly useful book for kids with hyperactivity. Children quickly identify with the hyperactive main character and are drawn in by the story and illustrations. Adults will find the advice portion of the book to be a treasure of well-organized tips and suggestions." More info here
https://www.amazon.com/Winston-Wallaby-Cant-Stop-Bouncing/dp/1785924036
First, there is a very strong genetic factor. But, it doesn't have to be a direct link. Good ol uncle joe could have been the link. But, I have seen numerous times where when the child was diagnosed and the parent started researching adhd - they said, "wait, so that explains why I always acted the way I did." And ADD or inattentive adhd is very easy to miss by doctors, teachers etc. So point being, someone in your family could have adhd or add and unless you really know what to look for - you wouldn't know it. Point being, my brother-in-law has adhd. I probably knew him for 20 years before I realized he had it. And, I think that he got it from his father (also my wife's father) who was a brillant Cal Tech scientist. And nobody would have ever thought his dad had adhd. Oh, and it can skip generations.
But really, the point is, it dosen't matter where it came from if its a correct diagnosis (thats a different post), what matters is how to deal with it. I have tons or resources if you have any questions. Best wishes.