Non-coding DNA is much more difficult to understand in terms of function. It can act to regulate gene expression both through the local sequence (promoters, enhancers) and through long distance effects. For example, very distant promoters can be brought together within the nucleus and hence interact with each. These interactions are a result of both the local sequence and the sequence of the very distant interacting region. The interactions are also dependent on the concentrations of proteins/transcription factors that also interact with these sequences. We have no good way of modelling that kind of complexity.
I suppose they could also survive selection pressure by hurting the organism if they're not expressed. for instance, by capturing a vital protein-coding gene from the host, and arranging things so the transposon must stay active for the gene to be transcribed.
Eukaryotic genome are the worst noodle code you have ever seen—but miraculously they help to make humans and other creatures, bugs, and plants with some consistency. That is a miracle to even the most hardened atheist!
1. Junk DNA is irrelevant from the perspective of the cell but in some way selected for by the fitness function of likely DNA transcription errors.
2. Junk DNA is formerly-coding legacy DNA that was "turned off" by natural selection but never fully deleted.
3. Junk DNA is in some way error-correction / check-sums for the coding part of DNA.
4. Junk DNA is physically protecting the coding parts of DNA by letting most stray radiation act inconsequentially.