We need to stop using the term “junk” DNA - it’s an outmoded term based on the wrongheaded assumption that DNA directly encoding proteins was the be all end all.
The even use the better term throughout the article (non-coding regulatory DNA) but someone thought they should stick 'junk' in the headline.
The whole saga of 'junk' DNA is pretty interesting, and serves as a cautionary tale for those who want to use science to prop up their metaphysical ideologies. These non-coding regions of the genome were long thought to be the detritus of evolution, nothing but extra baggage carried around by the genome. Richard Dawkins and others famously settled on this as a means of discrediting the ideology of 'intelligent design' because, as they saw it, an intelligent designer wouldn't leave all this junk sitting in the genome. The later realization that this junk was actually playing all kinds of roles in large-scale regulation, cell differentiation, three-dimensional structure of the genome, and was often being actively transcribed (to regulatory RNA), etc. tossed that whole notion out the window and then it became (for a few years) something the intellectual creationists tried to use to discredit Dawkins and co. There was something called the 'Encode controversy' over a decade ago which featured centrally and which is well described here:
Most people seem to have forgotten all that and accepted that large non-protein-gene-coding regions of eukaryotic genomes have various essential functional roles.
One man's junk is another's treasure. The truth is, a large chunk of it is somewhat "junky". I have a huge problem of using the word "junk" itself, as the word itself comes with so much baggage. When you really think about junk in the real world, it is not truly always junk - things can be recycled in some ways, and the matter itself is usually not destroyed... earth + energy gets used in some way, and then gets tossed aside..
Moving on to biology, we have ~2500 smell receptor genes in various states of decay. We also have a lot of deactivated smell receptor genes, with a lot of polymorphism across humans.. as it's in free drift. Perhaps a long time ago when we shared a common ancestor with rats, many of these were far more useful, with strong selection pressure to preserve working copies, but not so much anymore.. Perhaps the trash man didn't come yet, but it's definitely stored away in our basements.
A more concrete example would be the roughly 40% of our genome that consists of repetitive elements, transposons, and retrotransposons. One of them, the ALU sequence, is 300 basepairs long, and yet is about %10 of our genome. There are about ~1 million copies of this sequence across our genome. It's spread has slowed down recently. Out of about a million copies, most of them are "inert", with no further ability to copy themselves. Sure, given just how much of our genome is this one thing being repeated over and over again, it has some function in some places - causes various splicing events here and there, helps shuffle genes (which is a bit of a meta function across evolutionary timescales), but overall, if you had children with these parts mutated, 99.9% of the time nothing of significance would happen. 10% is huge, given the protein coding region is about 1%, and the regulatory regions influencing transcription & RNA expression with some sort of identifiable action is about ~10% (if we're being very, very generous). DNA is promiscuously transcribed, but this doesn't mean much of that has any particular function. A lot of is transcribed at very low copy numbers, and degraded as fast as possible. A lot of things are stochastic, so there is a "long tail" of what gets transcribed, and at very low numbers at that.
Another good chunk of that 40% of repetitive sequence is is old retroviruses we got infected with (not dissimilar to HIV) that totally raided our DNA and became endogenous - in fact they're called HERVs - human endogenous retroviruses. These mostly stopped spreading in our DNA as well. Also, large streches of our DNA is the same couple of bases repeated ad nauseam for no particular reason.. let's say AT... there are these massive streches that go ATATATATATATA and you find people are highly polymorphic and tolerate a lot of mutations in these sequences. Some people have it deleted with no ill effect. There are rare examples of this occuring inside a gene, where having the repeat go on for too long is bad for you ("Huntingtin" (no it's not a mis-spelling) is the paradigmatic example). This is the exception rather than the rule, considering we have more repeats than the entire % of coding regions in the genome.
Junk is a bad word, but it's not like there is a "clean rewrite", or "clean refactor" either... so things accumulate, get shuffled around, get forgotten.. randomly get deleted in snippets... most mutations are either neutral or detrimental, with happy accidents happening here and there.
Overall, it is nonsensical to force things into this binary of "junk", "not junk", but beware of thinking of the genome as one would a design schematic for a microprocessor, or an aircraft for that matter. There is a lot of stuff in it that's like meh... doesn't really matter if it's there or not.
On the assumption that there are big areas that can be skipped or deleted without any effect on the phenotype though, I've often wondered why there doesn't seem to be evolutionary pressure to delete them. Is it that the energy or other costs of duplication of those regions are not significant, or are there other factors that oppose it?
DNA, and many other biological polymers are structure as well as storage, some of these regions are about structure and modification of structure, to facilitate modality of function. they act as recognition sites, consensus sequences, torsion limiters, process interference selectors, user defined variables.
picture if you will, a big mass of magtape, no spool just a disaster, and you have to scan accross this mess until you find an accessible loop of it with a particular flag or type readable- likehow magtape works, except you have the mechanical challange of reading the tape in the form of a quivering, dynamic mass of spaggetti being read at mutiple locations and having to remain undamaged.
some of these regions make the biggest contribution by simply allowing mechanical slack and positioning of contact sites.
You can't have an evolutionary pressure to delete stuff in general, because then you'll oops out stuff that needs to be there. Short of that, building the mechanisms to figure out what to delete would be far more short-term expensive than copying everything around for one more generation.