It's the same gene expressed in different ways over the timeframe of the groups I mentioned previously. Meaning that it didn't just magically appear one day, it's always been there. And while Neanderthals went extinct c.40,000 BP, they and Homo sapiens diverged from their common ancestor some 500,000+ years ago. And we have the entire Neanderthal Genome to compare ours to, on top of the genome for chimpanzees since they are the closest extant primate to us. Again, the gene was there in all groups and worked the same way for much of our line. Being dormant doesn't mean being non-existant. It's also based in part on the estimated African population (since all lines ultimately originate from Africa) at the time which further explains when, how long ago and to what degree the gene is expressed.