‘Positive Natural Selection’ favors certain individuals that carry these advantageous mutations. Some of the Neanderthals had adaptive mutations that provided them an advantage against pathogens, some of which they were able to pass on to modern humans.
Existing thinking is that contemporary humans started moving out of Africa and into Eurasia, about 70,000 years ago. When they reached, they bumped into Neanderthals who, along with their own ancestors, had been acclimatizing to that geographic area for hundreds of thousands of years. The Eurasian environment shaped Neanderthals' evolution, including the growth of adaptations to viruses and other pathogens that were existing there but not in Africa.
Many Neanderthal sequences have been absent in modern humans, but some remained and seem to have swiftly amplified to high frequencies at the time of contact, indicative of their selective benefits at that time. Opposition to select RNA viruses provided by these Neanderthal sequences was probably a big part of the motive for their selective benefits.