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.