I think part of the problem is we've had this gender stereotyping in autism research for a while already, Simon Baron-Cohen is a big proponent of the "extreme masculine brain" theory, even though there's no evidence of male and female brains being different (they're homogeneous sets, there's more variation within each sex and overlap to the point where any difference is statistically insignificant - looking at a random brain, you can't predict if it's male or female). Cordelia Fine in "Delusions of Gender" really takes him to task on that. I really think it's genetic, there may be environmental factors that switch it on or off but someone has to already have a genetic predisposition to it, and we know it's congenital so it's either a mutation or inherited, and it runs in families so I'd say inherited.
That's part of the reason girls were underdiagnosed for a long time; we're pushed into social situations and expected to learn social skills much younger than boys are, and we're encouraged to do imagination play and role play which helps us practise social skills even if they don't come naturally to us (I used to do theatre and improv comedy and I still play tabletop roleplaying games, they're all very useful for practising). So we learn to mask and "pretend to be normal" as Lianne Holiday Willey puts it.
That, and so much of this gender pseudo religion lends itself very well to autistic traits. We often look for an explanation for why we don't fit in with our peers (and often prefer to hang out with the opposite sex, people from other cultures, or much older or younger people), one of the biggest and oldest autism forums is even called Wrong Planet, because we often feel "alien". In the 2000s, with the beginnings of the autism acceptance and autism self advocacy movements, some even liked to think we were a more evolved species of human, since we're better suited to some jobs and life in the modern world than some neurotypical people. I think it was just a sort of pride thing rather than being serious, but that sense of being apart and alienated is a common one.
And wanting to understand social skills and study them consciously rather than naturally pick them up. I used to draw Venn diagrams of social interactions and groups of people to remember what was appropriate to do (eg you can hug friends and family, and talk about personal matters with them; you can talk about personal things with your doctor but you can't hug them, etc). And when I see these endless Tumblr posts of different classifications and categories of "genders" (really just personality traits and social behaviours), I think, that sounds familiar!
The one that really chilled me was Diane Ehrensaft talking about how pre-verbal children (or non-verbal autistics) could express a gender identity. She talked about a little girl pulling hair clips out of her hair and throwing them on the ground; a little boy unsnapping his romper "to make a dress" (or a khameez or dashiki, it's not as if men only wear bifurcated clothes) and having a tantrum. I don't think those were tantrums at all, I think they were autistic meltdowns. We have very heightened senses and we hate the feel of certain textures and discomfort; I used to have meltdowns, like panic/anxiety/rage attacks if I were put into clothes with fabric that set off my sensory issues (much appreciation to @Babdoc for putting up with me and letting me wear soft joggers and leggings when I was a little girl!) or if we were taking my neurotypical sister to the hairdresser which I avoided because of all the noises, smells and people in my personal space. Nowadays I just cut my own hair or go to a barber where it's faster, but I can absolutely understand little autistic boys hating someone in their personal space cutting their hair. Not because they're "really girls in the wrong body" and want Disney princess hair (as if every girl does), but because they're just perfectly healthy autistic kids. They need to be listened to and need support to gradually get accustomed to the world and learn about it, and learn techniques like breathing exercises or mindfulness or ways to work with their autism to get the benefits of it and mitigate the downsides. It's a lifelong process and it's not a quick fix, but it's so worth it. And the world would be dull if everyone's brain worked the same way! :)