Submitted by SuperRMo7 t3_11mnt6z in askscience
In humans, sex is determined by the sex chromosomes. However in some reptiles, the temperature at which the eggs are fertilised determines the sex. Snails can change their sex from male to female during their lifespan. So what evolutionary benefit/advantage does this provide to those organisms?
Any-Broccoli-3911 t1_jbjqf8e wrote
Temperature-based determination existed before genetic one. Mammals, birds, and some other animals including many insects evolved genetic determination because the temperature of their egg was too stable to serve as a random way to assign sex. If the eggs have varying temperatures, temperature-based sex determination is the simplest way.
Hermaphrodism existed before non-hermaphrodite species. When sex was first evolved in the first eucharyote, they evolved into hermaphrodite species. Male and female sexes evolved later. Most likely because male animals were more successful at forcing their mate to do the female role which is more energy demanding, so they could breed more.