[Hans Asperger] was aware of the existence of AS girls but explained them away as having a post-puberty syndrome resulting from childhood encephalitis --- as opposed to boys, who are born autistic and therefore have the more "essential" condition. In any case, his subjects were boys; girls were simply beyond his scope. Many years later, Uta Frith attributed the vast disproportion of AS boys over AS girls to genetic transmission that is sex-linked, making AS females sort of an anomaly or fluke. But are we really such an anomaly? Perhaps our invisibility skews the data.
They go on to describe two hypothetical schoolchildren, an autistic boy and girl. Both kids have the same tendency to take things literally and both frequently fail to understand their teachers' and peers' meaning, but the boy is more likely to act on his (mistaken) ideas and get noticed and corrected, and possibly referred to a professional for diagnosis and special help. The girl is more likely to sit in her seat and do nothing, paralyzed by fear that she'll do something wrong and the other children will laugh at her. Because she doesn't say anything, or act out like the boy does, she won't be identified as having problems. Her grades will probably suffer, but nothing will flag her as clearly needing any particular kind of help. She will probably just be considered slow, or lazy.
A real-life counterpart of this hypothetical story can be found here in this ABC News report (via Autism Vox): in a family with two autistic sons, the mother found it exceptionally hard to get her young autistic daughter diagnosed because she exhibited fewer of the classical symptoms. The girl was less unruly and tantrum-prone than her brothers, which autism researcher Brenda Myles ascribes to girls being given much more intensive training in social skills, particularly related to pleasing other people and not being difficult, than boys are. The difference in social training is steep enough, she argues, to mask many of the symptoms in girls, such that the few girls who are diagnosed tend to be more severely affected. (This would fit with earlier observations that diagnosed autistic girls tended to have lower IQs and more associated problems than their male counterparts).
The flip side of this cultural expectation, though, is that those autistic girls who can't mask their strangeness are likelier to be seen as troublemakers or problem children. This "Autobiography of Anonymous" from autistics.org's Autism Information Library details a woman's life bouncing between different diagnoses, with many of the professionals who see her simply blaming her for being difficult or overdramatic. Because boys are given so much more overall latitude in how they behave, they are both more likely to be correctly identified as autistic and more likely to have their difference tolerated, regardless of diagnosis.