It's a very complex issue. As has been discussed:
- Is the incidence higher now than, say, two or three generations ago, or is diagnosis better?
- Is there an environmental cause (or causes)?
- Is there a genetic predisposition?
- Is it like a series circuit where there's both a genetic predisposition and something in the environment, where both have to be present to "complete the circuit"?
There was an interesting article in Wired magazine some years ago, in which, in a nutshell, it was postulated that back centuries and centuries ago, people on the autism spectrum tended to become monks and scribes and so on, and work in cloistered quarters hand-lettering books of scripture. Their genes tended not to get passed along.
Per the same article, their modern-day equivalents now write code. Plus, women are now well-represented in this cohort. The coders meet, marry, and give birth to autistic children. Per the Wired article, it is simply normal for Silicon Valley employers to advertise "top autism treatment for your children", as though it's to be expected.
Scott Alexander wrote some fascinating stuff about autism on his late, great blog "Slate Star Codex". The posts are archived, and still available. There's some good reading there. His new blog, "Astral Codex Ten", is also very interesting.
It's important to understand that autistic behaviour is on a spectrum - it's not a binary thing, whereby one either "has" autism or doesn't.
There is a range of behaviour that society generally considers normal, and which likely varies from society to society, and within groups within societies. It's my impression that a significant percentage of gamers (that is, online video-game players, and role-playing-gamers [e.g. Dungeons & Dragons players]) likely exhibit mild autistic behaviour, which is considered completely normal for that subset of the general population.
Some (and I say some, and I think they're wrong) think it would be very weird for old mechanical nerds to obsess over oil-change intervals, HTHS numbers, filtration efficiency, and so on. But we know we're normal!