For a different perspective on viruses as entirely
bad, it's thought that the placenta evolved from a virus being incorporated into the gestation process. The placenta protects two genetically distinct organisms while letting certain materials in and out.
From
https://whyy.org/segments/the-placenta-went-viral-and-protomammals-were-born/:
“The placenta is essentially a fascinating organ because it allows for two human beings that are genetically very different. Because half of the fetus is maternal, but the other half is paternal, and yet the pregnancy can go on for nine months without the mom’s body destroying it,” Barroeta said. “And that, from an immune standpoint, is fascinating, because if you were to receive a piece of someone else and insert that under your skin, that would not last there for three days, your body will actively reject it.”
When evolutionary biologists like Chuong mapped the genomes of these cells, they found that the protein that allowed these cells to fuse into a wall, called syncytin, didn’t look like it came from human DNA. It looked more like HIV. According to Chuong, this protein actually came from an ancient retrovirus, the most famous of which is HIV.
“We got an upgrade,” Coolahan said. “Viruses fuse with things in order to infect them. Now, we get this viral DNA that lets us make a protein that fuses things.” Once a viral protein, the virus essentially morphed or evolved into what we now know as syncytin. This protein gives baby the ability to fuse cells into a wall — the placenta — that connects mom and baby but also keeps them separate.
Looks like we’ve been domesticating viruses for a long time. Or have viruses been domesticating us? Either way, what all that DNA is doing for us is, for the most part, still a mystery.
“It just seems like in a way we’re part virus, otherwise we’d be laying eggs,” Coolahan said.