I still want to grant the benefit of the doubt to my fellow biologists who recently have made statements about non-coding DNA being potentially useful in the future. Natural selection does not work this way, because it is simply the differential survival and reproduction of entities based on heritable differences. In the most common case, this means individual organisms within populations leaving more or fewer offspring and/or surviving or dying under given conditions in a non-random manner due to heritable trait differences. However, the general principle of natural selection is not restricted to this level, and is a logical consequence in any circumstance in which there is differential survival and reproduction based on inherited variation. There can be selection within the genome among transposons, for example, and some authors also argue that selection can take place among species (as differential speciation and extinction).
The most straightforward way of thinking about natural selection is to imagine that a certain genetic trait is either beneficial or detrimental to an organism, such that it is passed on either more or less commonly to subsequent generations. However, there can be higher-order selection as well, in which some lineages persist longer or branch off to form additional daughter lineages more often than others for non-random reasons. This is not why those traits originated nor why they are maintained from one generation to the next, but it could explain why lineages with those traits are more common or last longer than others.
As an example, consider sex. Sexual reproduction involves the recombination of genes which has two important effects: 1) it allows beneficial mutations to spread more easily in a population, and 2) it prevents the ratchet-like accumulation of deleterious mutations at multiple loci. What this means is that sexual lineages can be expected to evolve more quickly and to last longer than asexual lineages. So, when we look around, we expect to see more sexual lineages than asexual ones, and indeed that is what we see (at least in animals). Sex did not evolve so that lineages would have greater evolutionary potential or would survive for a longer time, but that is nevertheless a significant effect when considering the distribution of biological diversity. However, there is still an issue that sexual reproduction is costly: you only pass on half your genes, you produce “wasteful” males, you have to find a mate, and so on, so we also need to consider immediate benefits that keep the trait around long enough for us to even notice the higher-order effects.
Now back to “junk DNA”. It may be that over the long term, lineages with more non-coding DNA are more flexible and can diverge more often, or that they are more resilient to environmental change and will last longer than those with less DNA. If this is so, then this might explain why we see lineages with lots of non-coding DNA — because those lineages persisted while others disappeared. We would still have to explain the origin of the non-coding DNA and the reason it persists over the shorter term though. There are several possibilities. One, non-coding DNA is beneficial to the organism in some way. Lots of ideas have been proposed for this over the last half century. Two, non-coding DNA could be neutral and is simply not eliminated by selection. Three, non-coding DNA is slightly detrimental, but selection has been too weak (e.g., if populations are small) or mutation too strong (e.g., continual transposable element insertions) for it to be deleted. In any of these situations, it could be possible for non-coding DNA to persist long enough to be co-opted (by chance mutations and subsequent selection) or to have impacts on lineage diversification and/or lifespan.
The problem with this is that species with small genomes are much more common than ones with large genomes and large-genomed species seem to be more sensitive to environmental challenges. So, the most likely scenario is that mutational mechanisms affect DNA amount from the bottom up, while selection comes into play from the top down in terms of effects on cell size and also selection against disruptions of genes. On balance, some lineages end up with large amounts of non-coding DNA, and in some cases this is co-opted into functions like regulation or structure.
It certainly could be that some people are thinking about this from a reasonable perspective based on multiple levels of selection and time scales and are just being sloppy in their descriptions of the net processes. Or maybe they really do think that “junk DNA” is kept because it might become useful. Either way, we need to steer clear of simplified soundbites that obfuscate more than enlighten.