"If you take a female fetus and expose it to large amounts of androgens (male hormones) while it's in the womb, it will come out with a male-type brain. So it's still "biologically" a woman in the sense of chromosomes, but the brain is not like that of a normal woman."
The exposure to these hormones would have to be the result of their own bodies for this to occur. And since this is a "female" body and not a "male" one, the glands would secrete estorogen. This would over ride a pre-pubecent child's "male" brain.
They had a tomboy and decided to mutilate the kid to make her "normal"