I think the plain answer is that if they didn't, you wouldn't know about them. Just like all other parasites. In some sense, we're all parasites on plants, that in turn feed on the energy delivered by the giant fusion reactor in the middle of our solar system.
In the case of viruses, remember that there are viruses for much simpler organisms, like bacteria. And yes, you can use those to treat bacterial infections.
> In the case of viruses, remember that there are viruses for much simpler organisms, like bacteria. And yes, you can use those to treat bacterial infections.
Those are called bacteriophages (a misnomer, since they don't actually eat bacteria).
I have a theory that bacteriophages originated as a biochemical weapon for inter-bacterial competition.
If you think about it, the ability to produce packets that target and penetrate a competitor's cellular wall and inject a payload is pretty useful. Payloads could be as simple as a toxin to start.
From that point, you could have stepwise improvements for deliverables that disrupt reproduction in the target (for example by cutting apart DNA strands), by inserting junk genetic material to evade self repair mechanisms, by inserting or removing specific genetic sequences to create other vulnerabilities, that insert the specific genes to make copies of the delivery system and various payloads (this is useful even if the 2nd gen copies are poor and don't include those same genes), and then finally a fully self-reproducing package that can spread exponentially.
At that point the 'weapon system' can evolve independently, and indeed co-evolve with it's target/host to (probably) jointly outcompete other species including the originating species.
Even prior to full self-reproduction, proto-viroids might act as a horizontal gene transfer mechanism that can exhibit familiar 'selfish gene' patterns and mediate various feedback loops between bacterial species. After 'escape' any species remaining with proto-viroids mechanisms would likely be parasitized and bootstrapped into actual viruses through competition and crossovers, or have those mechanisms suppressed into remnants indistinguishable from endoviruses (presuming endoviruses can even be identified in organisms as simple as bacteria).
An arms-race of proto-viroid attack vectors might also be the antecedents of and/or the driving force behind the need for various organelles that distinguish the more complex eukaryotes from bacteria.
"In some sense, we're all parasites on plants, that in turn feed on the energy delivered by the giant fusion reactor in the middle of our solar system."
I think that's wrong. By definition, a parasite interacts with a living organism. For example worms that eat the remnants of fallen leafs are not parasites, they are saprophytes. Humans as well can live consuming bits of fallen fruits that do not take part in plants' further reproduction (i.e. fruit's seeds) and would otherwise just rot (and can thus be considered dead tissue).
In the case of viruses, remember that there are viruses for much simpler organisms, like bacteria. And yes, you can use those to treat bacterial infections.