Just jumping in in the subject.
A lot of viruses are dormant in the cell genome. A lot of cell genomes are contaminated by viruses. However, would the virus a conscious device designed by a cell to defend itself... hmmm... not likely. An anti-bacterial (cell) product, specific toxin, protein, acidity, etc. is already pretty effective. To assemble a complex structure to aim at another cell, release more than 15 to 200Kb of DNA and avoid a self-infection is another thing. Unless it<s a program suicide... and cell are good at this.
I am not against a cell based theory where a virus would emerge from a cell. Especially when we think about aberrant events. Per example, would the mitochondria would be of a virus nature? A virus infection that became symbiotic. That would be the reverse theory. Also, it does not take much to make a virus artificially, a string of DNA, a lipid/protein envelope. The new liposome transfection kits shows this clearly. That could be the ancestor... an aberrant cell event.
While started, that Frankestein defective cell, was able to benefit from a high and uncontrollable replication rate, therefore high mutation and a constant exposition to their host, adapting, getting better at replicating, compacting even more the information, mastering the art of mutation. I guess more studies are required. Especially studying the genomes of viral particles isolated from different organisms collected in frozen tissues (Phylogenetic analyses with current forms).