Several kinds of fish change sex during their lives (as explained here: https://news.ycombinator.com/item?id=13430247). And in some types of insects any unfertilized egg develops male, allowing a lone female to produce a male offspring to mate with (at which point her fertilized eggs develop female).
And then there are reptile species in which sex is determined by the temperatures the egg is exposed to as the embryo develops. And then... and then...
Sex determination is way more complex and messy than people like to think it is.
Several kinds of fish change sex during their lives (as explained here: https://news.ycombinator.com/item?id=13430247). And in some types of insects any unfertilized egg develops male, allowing a lone female to produce a male offspring to mate with (at which point her fertilized eggs develop female).
And then there are reptile species in which sex is determined by the temperatures the egg is exposed to as the embryo develops. And then... and then...
Sex determination is way more complex and messy than people like to think it is.