An interesting question that drew me in immediately because I have a family member with this disorder. I also teach clinical diagnostics on childhood disorders. I would be happy to answer your question.
While it is true that a small percentage of people with autism have exceptional abilities, the range of true exceptional ability, savantism, is very small. Less than 1/4 of 1% of the population of those diagnosed with the disorder seem to have exceptional ability (savantism), and that statistic may be high due to researcher bias. That is, when we desire to see something as researchers, we tend to see it due to that desire.
The abilities are not extremely random, as the abilities typically seem to originate in the left brain hemisphere, where logic and math appear to reside. (The thought on this is fascinating as we are starting to see evidence that blood flow in the brain of autistic children is more vascular in their left hemisphere and less so in the right, especially in areas where mirror cells develop. These mirror cells seem to be associated with our social abilities and even the contextual use of language.)
For a person diagnosed with autism: These exceptional abilities are typically in the areas of mathematics, counting, music (especially seeming spontaneous understanding of an instrument such as a piano) special relations, (mapping) number calculations such as statistics, and memory; such as would be seen in recalling vast sets of grouped numbers.
Recent studies of autistic children have shown that many of them are suspected to have estimated normal IQ or above and that it is the limitations of the tools that we use to measure intelligence and ability (aptitude) that are the problem. The greatest limit in this area is the fact that the criteria for true autism (not pdd disorders as a whole) is limited language development. Not having language development in an adequate form hinders testing, so that estimations of IQ in an autistic person are typically all that is available. So, hard statistics in this area are nearly impossible to acquire. Instead, observed traits are recorded, a much less mathematically exact way, but the best we have.
Why do they rise above the rest? That is a hard call, but most researchers believe that the undamaged areas of the brain, often left hemisphere as mentioned, show increased vascular development. Simply said, like a person who loses use the use of an arm, the other arm compensates with greater strength and even dexterity to make up for the loss. Autism is seen in a similar way that the brain compensates for the language loss and social deficits by sending body resource to develop the other areas.
If you found this reply helpful at all, please rate me three stars or above. Steven