It could be that old viral code has been repurposed long ago by evolution and serves a purpose.
My university molecular genetics course taught me that DNA is very complicated. Many of us know of the simplified model where an RNA polymerase, encouraged by some transcription factors, locates and binds to a promoter sequence, unwinds the strands, and constructs an RNA strand. However, DNA has a 3D structure. Histones can wind up DNA tightly enough to hide genes from transcription proteins, or they can unwind and expose DNA to encourage expression. Some transcription factors can bind to sequences several kilobases away from the target gene, cause that part of the DNA to fold onto itself, and ultimately bind to transcription proteins to encourage expression of the target gene.[0]
Extending your comment, it is entirely possible that bits and pieces of old viral code have accidentally led to weird things like this, and that many organisms now depend on this behavior.
[0]: https://en.wikipedia.org/wiki/Transcription_factor#/media/Fi...
(In the course of reading about transcription factors, I came across something pretty neat that's related to all this about 3D structures: https://en.wikipedia.org/wiki/Transcription_factories)
Edit: I should also mention that, if it wasn't obvious, that viral DNA getting inserted into certain places can disrupt these complex interactions by increasing or decreasing the expression of a gene. For the cell/organism, this can be detrimental, benign, or perhaps beneficial.
The premise is that it is not organisms, but genes themselves which are the primary target of evolution. All but the gene is mere trappings that surround their competitive replication. Those genes that manage to slide from generation to generation aren't doing nothing, they are those that are most successful at duplicating themselves into the next generation. If they do not hinder the organism in their duplication, there is no pressure for their removal.
See we know about computers pretty good. But about DNA we get ignorant.