Another point of interest is that the actual germ cells, which are to become eggs and sperm develop in another part of the embryo entirely from the gonads - in fact near the heart. They then migrate through the tissue of the embryo to the gonad. By the time they arrive the gonad has prepared itself by becoming male or female. The testosterone influences duct development. In some individuals the tissues are unable to respond to testosterone.
Lets look at the developing male and female reproductive systems.
In the male the indifferent gonad responds to the effects of the Y chromosome to develop testis cords which become horseshoe shaped and enclosed within the thickened tunica albugina of the gonad. The free ends of the horseshoes are in contact with the redundant mesonephric duct. The paramesonephric duct develops in response to placental and maternal hormones, but is unused and later regresses. The paramesonephric duct has regressed, to be represented only by the appendix testis proximally and the utriculus prostaticus, a small diverticulum in the prostate gland distally. You will also note that the right hand side of the slide shows a different relationship between parts, because it covers the period of the descent of the testes.