When scientists discovered that bacteria, not stress, caused most stomach ulcers, the insight overturned a century of medical dogma, transformed clinical practice and garnered a 2005 Nobel Prize for the two researchers who made the connection so many others had missed. After people adopted antibiotics to treat gastric distress, though, microbiologist Martin Blaser and his colleagues at New York University began to document an odd medical trend.

Ulcers did drop dramatically, as expected. So did the incidence of stomach cancer....