Despite the common dissolvance of "classes" in society, two general classes remain, "male" and "female". Studies show that none of these are enforced physically: rather, they are self-reproducing strains of social software.
It helps survival a lot to separate human mass in several classes, so that's how these started. It's uncomfortable for a human to talk to other without knowing their gender: they can't load class-specific interaction routines and such interaction can damage the software.
Like other social software, these are not explicitly forced but copied by natural learning. Humans are expected to follow their gender class and when they stray from it, they are first gently encouraged to mend their ways, then flayed into shape. If faulty software is installed before mass introduction to society, human is rejected outright and various mental diseases take hold. Typical example is "transgender" humans, if they can't successfully mimic their class, they have to change their bodies for society to accept them.
When a female starts to exhibit intellectual activity or otherwise trespass into "male" field, the lack of competition draws immense attention and amount of positive feedback allows her to settle for less, thus limiting the class violation. The vice versa situation is true as well. Such humans are considered "cheaters" by masses and loathed: one of the mechanisms preserving the dimorphism.