Previous pandemics (most notably 1918 Spanish flu) have “disappeared” in the sense that they had either exhausted the pool of hosts and had no natural reservoir with which to fall back on or they mutated to become less deadly or less symptomatic.
The Spanish flu strain (H1N1) circulated as the common flu until 1957 when it was replaced by Asian flu in 1957 (H2N2). However, it reappeared briefly as the Russian flu in 1977.
And then reappeared as Swine flu in 2009.
How does mutating eradicate the non-mutated individuals?
In the Plauge Inc videogame, you can upgrade your virus globally by unlocking mutations. I think that might be where the popular misconception about mutations instantly weakening the virus on a global scale come from. In real life that can happen, but only in situations where it sits around in the population for years, so that it has had several "go-rounds" to sieve the best genotypes from the worst.
My personal theory is that lethal mutations or the ones that cause severe symptoms get detected and isolated where possible, while the mutations that cause only mild or no symptoms can continue spreading silently without anyone noticing. If both create the same immunity, the non lethal mutations will win. If this theory holds, testing only if a person is showing symptoms would be the right thing to do. Filter the dangerous mutations, let the other ones spread.
A mutated virus that spreads faster gives immunity to the hosts it infects from the ones that spread slower. The hope is that the more transmissible strain is also less lethal.