If you are suggesting that the TG gene would did out because of natural selection, I beg to differ. Run a poll and see how many members have children.
Genetics is certainly an avenue worth exploring, but we've a very long way to go before we k is enough to attribute conclusively. Meanwhile think on how undifferentiated we are until puberty. Both sexes have nipples. Why? Or more to the point, what other physical attributes might we have that might have their gender bit flipped by the right stimulus?
Mine you, I not suggesting that any particular explanation has more merit. I am simply humbled by the elegance and complexity of the engineering that went into us.