What happens:
In short, chickens have a spare gonad. They simply can’t develop both of them into a fully functional egg production machine. Given the right circumstances. That second, dormant gonad will wake up and start producing androgens.
More Info
- Live Science Article about it: https://www.livescience.com/13514-sex-change-chicken-gertie-hen-bertie-cockerel.html
- Here’s a research paper on the subject: https://pdfs.semanticscholar.org/3212/3e90aac57f9607210adcb3e53ddf98f51b5c.pdf?_ga=2.78224018.70789312.1525872700-808396487.1525872700