If sex and gender always aligned cleanly, it should be possible to point to a single biological trait that universally distinguishes the two sexes. No such trait exists.
There are people with mixed or atypical combinations of chromosomes, gonads, internal anatomy, and external genitalia, penis with uterus, XX with testes, ovotestes, and more. Any proposed physical marker has documented exceptions.
Because of this, mainstream biology treats sex as a collection of related biological traits rather than a strict binary, and distinguishes it from gender, which refers to social roles and identity.
The confusion in determining gender going by sex is not "trans idiocy." It's a simple biological fact that the alignment can be confusing.