MWhen a player puts down a gender on their character sheet, the player is stating that they want to deal with situations in game that have to do with that gender. It is an invitation for the GM to make life difficult/interesting for the character because of their gender. A male player who playes a female fighter is asking for some joan of arc type stories. It is the GM's job to make the decision of gender have meaning, not the player's job. When a player attempts to make it meaningful without the assistance of the GM, the element of gender becomes uncomfortable.
Except that all that demonstrates is that the GM is sexist, or an ass. There is no need to be "historically accurate" in any non-history based games. There is no need to have all the villagers hate your character because they're a woman, or have the local priest want to crucify her because she's not in her "womanly role". Making "life difficult" for the player is just rude.
Certainly there are some things that the player should encounter that are different, but not to the extreme that "you're so unique that everyone hates you and you have to die."
example: In one of my friends game(a game I am fortunate to not be party to), a female friend of mine played a female character, except, the DM, being sexist and feeling that a fantasy world based off historically male-dominated "dark ages" should be oppressive towards women, which culminated at one point in the GM having some NPC attempt to rape my friend's character.
It should be needless to say she stopped playing that game, and actually stopped being friends with the GM.
THAT is the exact kind of path you put yourself on when, as a GM, you decide that because the PC is a woman, life needs to be harder for them. Sure, maybe it's a rude joke at first, but that doesn't really rile the player. Then it escalates, now it's public humiliation, and then suddenly, it's one night she's separated from the group and cornered by a dozen young men.
If you're going to "have it out" for players who do something outside your little box, make it clear, or ban it right from the start and simply deny the player the ability to join in until they meet your requirements. But going down the "life should be harder for women, and I don't like men who play female characters" ends up with situations like above. And suddenly you're not just a GM who likes things his way. You're a GM who just had a player's character get raped, and that kind of thing WILL stick with you.
I don't mean to sound overly harsh, but I keep seeing the shadow of "I am going to make playing difficult for male players who play female PCs" and I want to get it right out there that a mild difficulty escalates quickly and often gets out of control.