In fact, all living beings have evolved as hermaphrodites. It's just that some hermaphrodites were better at pro genesis. So their female characteristics were favoured and encouraged by nature. When a baby is conceived , it has got potential of becoming both male or female. But a very tiny gene on Y chromosome codes for secretion of testosterone at certain stage of embryo genesis & that is what leads to enhancement of a particular set of sexual organ. All women have mullerian ducts which are remnants of male sexual organs & all men have wolfian ducts which are remnants of female sexual organs.