Diseases are believed to continue in human populations originally because of a balance among mutation, genetic drift, and natural selection, with alleles that provide to infection preceded by mutation, directed in part by stochastic genetic drift, but eventually excluded from the population by cleaning selection.
Those most susceptible are more likely to get complications and die or be less fit. If the sensitivity were genetic fewer survivors would presumably have some descendants. Those with better resistance would rise in proportion to those with comparatively lacking immunity all other things being alike. That change in the ratio of genetic types would be evolution by natural selection. Modern medicine involves that a bit by usually curing most diseases.