I have a smart kid who has ADHD. I think that a lot of kids thought of as gifted simply have brains that are wired differently. They think differently to other kids and often don’t fit neatly in mainstream school systems. It’s no surprise that the features of giftedness that you mention are commonly experienced by kids who are ADHD or autistic.