The concept of junk DNA was mostly taken apart a few years ago. Those sections often serve regulatory functions and other purposes related to controlling how genes are used and at what rates.
It's speculated those regions are gene foundries, but it's mostly speculation with limited evidence.
In zebrafish and mouse, the more "developmental" a gene is, the more SPACE it seems to have around it. More space means more regulation and more potential for new regulation.
The relative lack of non coding DNA in other, simpler cells doesn't tell us that we don't need ours. It's equally possible that our DNA is just making significantly more dynamic decisions.
And it's not necessarily that they have more coding regions. It's that they have a greater percentage vs noncoding. It's a proportional thing.