This is Sam, a chicken who is literally half male and half female. Early in Sam's development, Something Happened, (possibly a chromosomal nondisjunction, or a double fertilization). Sam is a mosaic, containing two types of cells; those with both ZZ chromosomes (male, in birds) or ZW (female) chromsoomes Sam's "male" half has more ZZ, and the "female" half has more ZW cells. And, the cells of each half developed autonomously : that is, it didn't matter what hormones were coursing through the body, all that mattered was the chromosomally determined sex of the individual cells.
In mammals, sex is presumed to be programmed during development, regardless of the chromosomal complement, in responses to signals from the developing gonad. This is called cell-nonautonomous, because the individual cells depend on external signals to "decide" which way to develop. So cells with male chromosomes can develop as females, if they get those signals. In birds, it appears to be somewhat different.
However, there is clearly some genetic determination in birds particularly for the gonad; alternatively, perhaps there is also some cell autonomous development of some traits in mammals.