“Survival of the fittest” is not the same thing as “survival of the best,” though not apparent at first glance.
“Fittest” means “most able to become a grandparent.” Sound weird? You might think “fittest” means “most able to create offspring,” but that’s not true if the offspring themselves are unable to continue the process of reproduction. A horse mated with a donkey creates a mule which is sterile; the parents in this case cannot become grandparents, and thus is an evolutionary dead-end.
The “grandparent” requirement is the only requirement, which means bad things can be “fit” just as well as good things. Viruses are amazingly fit — not only becoming grandparents, but doing so at prodigious rates which make them quick to spread and difficult to stop once noticeably numerous.