As a host cell manufactures new viruses, it sometimes accidentally adds some of its own genes to them. The new viruses carry the genes of their hosts as they swim through the ocean, and they insert them, along with their own, into the genomes of their new hosts.