Why doesn’t everyone get it? A “bug” has a small number of of surface proteins that can each latch onto a specific surface protein on a cell before infection can happen. If your genetic shuffle doesn’t happen to have those surface proteins, you won’t get that disease. Also many may have has an earlier similar “bug” and their immune system is already primed to fight it. Cowpox vs small pox for example.
But what stops a pandemic before everyone else is dead? Simple answer? I don’t know.
Viruses seem to be nature’s way to limit populations. If something is getting out of hand or has mutated in an unusual way, a virus will correct the imbalance.
Just as mutations happen in viruses, they happen in man. The will generally be a decent percent who survive.