The full quote is fascinating though, and adds an interesting context as it's Angua (a werewolf) and Carrot (human, but raised by dwarves) discussing a dwarf colleague, Cheery.
"Female? He told you he was female?"
"She," Angua corrected. "This is Ankh-Morpork, you know. We've got extra pronouns here."
She could smell his bewilderment...
"Well, I would have though she'd have the decency to keep it to herself," Carrot said finally. "I don't think it's very clever, you know, to go around drawing attention to the fact."
"Carrot, I think you might have something wrong with your head," said Angua.
"What?"
"I think you might have it stuck up your bum."
Sir Terry Pratchett - "Feet of Clay"
This is CARROT being the asshole. Carrot who has, throughout all the prior books, been depicted as basically the best of all possible people. He is noble, brave, considerate, kind. He is the good guy in the entire City...
... and yet, he grew up dwarf, and has picked up their more conservative views on gender identity.
Discworld dwarves start out in the books as basically a people without visible gender differences (thanks to the woman growing beards just like the men) and using "he/him" pronouns as their default. Anything else is seen as breaking the most basic of social conventions. (Dwarf dating is described early on as being two dwarves who like each other spending an inordinately long time trying to find out, as tactfully as possible, what gender the other dwarf is)
Carrot does immediately adopt the "she" pronoun for Cheery, which is but wishes she didn't make such a fuss about it. He's prepared to tolerate her choices, but he doesn't APPROVE of them, and thinks that that is enough.
Carrot, because he IS Carrot, does learn to open his mind on this subject, perhaps his final frontier of bias, but I do love that it's addressed as something he has to work on, and succeed.
And to Terry Pratchett's credit what started out as a throwaway joke about dwarf sex, gradually becomes a multi-volume subplot which is a fascinating exploration of gender and social identity as more dwarves start to "come out" as being female, and not just identifying as female, but changing their form of dress to something which matches who they are (they keep their beards though, because to a dwarf, that has nothing to do with gender, and everything to do with being a dwarf) and how their society has to adjust, with differing levels of comfort, to this new reality.