So they weren’t a different species. When closely related different species mate, the offspring is not fertile. For example, a horse and donkey make a mule, which cannot reproduce. The offspring of Neanderthals and Homo sapiens could reproduce, otherwise we wouldn’t have Neanderthal genes in our DNA.