No specific reason is needed, they are or aren't.
To support that, it possible to look at any mammal - they do have brains, and some cognitive abilities. Many of them have problems to communicate with each other, or some being hostile to each other protecting their territory, except times of reproduction. They do have repetitive interests - sleep, eat, sleep, eat etc.
ASD is a disorder only when you have something different to compare with, when it is a minority cases of a different brain wiring and develolment - only then it becomes deviation or disorder, but it could be relatively norm for ancestor species.
If we take look at monkeys, which mature in a year or few, and compare them with humans - chimps do outperform humans on certain tasks(observing) and if they could they could say humans have ASD or ADHD as we can't perform such tasks. We can't perform such tasks as children and adults, so we just can't but still(they have more developed in a sense visual cortex, so it not necessarly a thing we can learn, they wired a bit differently). (They count all kinds of objects below 10 a few times faster than we do, some japan research park with chimps, there was a video on youtube, in a sense certain observation skills of theirs are superior to ours).
It just that our development has a path further to maturity of a typical human, compared to chimps, and the path is different from others and has different treats, and we have different other capacities. And if we look at monkes it is them who have ADHD in their behaviour and ASD(maybe).(really just watch observe their behaviour, the way they use tools, sticks as an example, there are videos on youtube)
Any disorder humans have, as long as it does not endanger surviviability as a species, in some conditions, it can be a valid ending point of brain development. We call something disorder because it is a deviation from typical what we have, but by itself it is not something objectively bad or insufficient for main goal - survivial. What may be "second grade" for us, could be godly gift to others.
I mean brain we have in the way we have, more or less an exception(look at all the others mammals), and if brains of others have something we would call a deviation or disorder for ourself, can be a typical case as long as it is capable to serve the main goal - survivial. Barin themself, and behavior, and nuances can be any as long as that survivial is there.
Some behavior can be better for survial, and we outperformed(or rather our ancestor species, and not knly because of brains but because of luck too) few other branches which existed at the same time and had contact with each other.
And it has to be understood, that the fact we outperformed someone of our kind at survivial does not necessarly mean we outperformed it by intelligence, maybe those we outperformed(just my fantasy, and it possible disprove it, not sure about it) those other guys were in sculpting and painting or wood carving like Michelangelo but it wasn't time for that - it was time to eat whatever one could find, time to kill etc. It more like a note, and expansion of initial statement saying brains can be any, have any feature.
If I return to OP situation, when it is a percentage and when it has something positive, and if I let's say will be blunt, then - for a stupid species having higher ASD percentage first of all does not affect them that much, does not make a big difference, and it can be a positive because of "restricted or repetitive behaviors or interests". They have not that much brain capacity in a first place and retan attencion is hard for them, a monkey uses a stick for 5 seconds and then it is forgotten in the span of next 15 seconds, a monkey forgets it, it has no interest to that tool anymore, it does not explore its potencial beyond the moment it used it.
One who would take it more often, use it more often on a longer time frame may be building up mucles, and reflexes and expand uses of a stick, in a sense conducting exploring resears task about that stick, making random discoveries. I would not be suprised if all that started from something like that for us.
It took million year or so to get to stone tools and chipping stones - carrying using stones could become a habbit, but chipping it really requires some obsession. And because one can teach another, or be taugth just by observing others then it does not matter if other side had ASD - whatever, just invent. Modern folklore of that kind is a mad scientist. So being able to focus, some degree of obsession helps in some cases(and is a problem in other cases) - it can be curse and blessing at the same time.
And for a species member being randomly obsessed with something over and over again - can be, and maybe was the way to conduct research and development process - until they become smarter.
So asking why is a little bit incorrect way to look at that, but one of many many more potencial answers could be - they still in process of reducing the percentage(if at all) which is left fro previous develolment stage, and speed can be any, it depends, are there some other useful associated behavior (there are for some in some cases) etc. Science one of the fields to focus on - imagine 10% ppl being mad scientists - I guess we would time travel at this point, lol, not mentioning bending the galaxy inside out(or die out as a specie).
- a general answer could be becuse it is beneficial in some way for group and society, had few examples, and it can co-evolve futher, so it has not to be a thing to be abandoned. And I would say we call severe cases as a disorder, but milder ones or even lesser ones do play their role in our society and in our development, they are ther, all over the youtube, lol, (diy community?? Lol)
All in all it a bit more complex than just call things a disorder, it needs to understand why we do so, and that brains and behaviors is a wide range of as animal and insects show it to us - those all are ways wich eligible for survival. And different patters can come because of different ways to develop them. And even if we know, have an example to compare to, to say that something is worse for this or that, it does not make that other thing bad in the other curcumstance, until those two are in direct competition.
Society/groups as buffer plays a big role as here as well, but it big topic. So just find something good to have, it has not to be a good for all 100% of the cases but if it good in 1% cases, good for society/group - it can make a huge difference. I mean things are more complex and more flexible that it seems you think they are. Just find something good, blow it as big as you like - done, you have your why reason.
Reading @Goodies comment, which reminded me, unfortunatly can't answer in the comment section, this comment reminded me about a channel, ...Gamers... something something (can't look it up atm, but maybe someday I'll put the link) - there was a guy talking about ASD if I recall correctly, and putting a theory/explanation(he has some background for that) that there are 3(or more, do not recall) behivor patterns which by itself aren't that bad, and not so bad as combination of 2 but when one hits all the marks it may become a problem(or may not, depends how strong each factor is, external conditions and external requirements for an individual etc). And brain as a whole can be seen as a combination of many such islands(patterns), which influence each other which then manifests itself in a behaviour of an individual. Some is learned, some is inherited, some is result of environment etc etc. So having a percentage of something out of place for complex enough net of those "islands" is not suprising, even if that something is not beneficial, but it can be just unlucky combination of otherwise beneficial things. I really have to find that channel, seems it is exactly what OP has to listen to, to get a better picture.