One of the theories/explanations for the way aspergians/autistics process information, especially autistic savants, is that compared to NTs, our brains aren't as good at disregarding "unimportant" information. Now the thing is, "unimportant" information is basically anything not used in natural everyday life. But this includes things like the ability to focus on technical details in fields like computers and engineering, and probably events in your early life (keep in mind, this is from a survival viewpoint, not a nostalgic viewpoint where some of us might want to remember)
Now I don't really know enough about biology to look at this theory from that point, but from an artificial intelligence viewpoint this makes a lot of sense. Some tasks that we take for granted, such as facial recognition, are being found to be enormously computationally complex. Now if you look at some savants, a lot of them have photographic memories and some are able to retain virtually every fact they've ever heard or read. At first, it may seem that these feats would take more raw brainpower than tasks such as recognizing or being able to read people's faces, but in fact it's the opposite. So computationally, it makes perfect sense that a slight deficiency in social skills could free up the brainpower for extremely well-developed memory and technical/academic skills.