There are many microbes on Earth that produce toxic chemicals and are capable of turning the Earth into a toxic world that can't support life if they were allowed to multiply but viruses kill them so viruses are preventing the Earth from being toxic.
They are a gift that gives us life but occasionally new strains appear that attack us but mostly they are helping life on earth to persist.