For decades it's been without explanation but recently Dr Blakely has described a bunch of cases where it was narrowed down to SERT transporter polymorphisms and inflammation.
Worth a watch for those interested in the weeds of this stuff: https://www.youtube.com/watch?v=cpDtuKV5CJs
I've got a pet hypothesis that differences in Serotonin metabolism (and receptor hypersensitivity) might play a role in why SSRIs aren't generally considered a first line treatment for ASD symptoms, https://www.pnas.org/doi/abs/10.1073/pnas.1112345109