A theory which has very broad acceptance these days, FWIW.
After a series of revelations in Science News about various bits of DNA that researchers hadn't understood until recently, I assumed "junk DNA" simply did stuff they hadn't figured out yet. Large stretches seem to involve timing. Retroviruses are another interesting theory.
My favorite quote on the subject is that garbage is what you throw out, junk is the stuff you keep in the attic because you don't know what it is good for yet.
On a case by case basis, we do know quite a lot about certain pieces. There are a lot of sites having to do with transcriptional regulation, one way or another, for instance. And transcriptional regulation is possible the tip of the iceberg, but generally where things are at. Because without understanding that piece, having a genome is kind of like trying to figure out what is being served in a restaurant at any given time by reading the cookbooks on the shelf. I mean, yeah, you'll get a general idea, but not so much, not to mention a lot of the recipes don't get made, or they get made differently than how they're written down... or they get made differently on different days, and it's all only tangentially related to what's going on today. Which is why share an awful lot of genes more or less in common with yeast, but we're also pretty different from yeast.
Oh, and some large part of the transcriptional regulation is epigenetic. Whee!
Have any of you ever done genetic programming? I mean, really, this analogy is backwards, but I learned genetic algorithms before I did serious genetics per se. And while genetic programming is fascinating, and it's a lovely way of finding a solution (that we'll likely not understand) to problems that we know have a solution but can't describe, it's slow, not optimal, and you'll get the messiest and hardest to interpret code out of the thing ever. And biochem, and genetics, because at this level they're the same thing, are just like that. (Which is why I often wish you could take people who insist on the whole intelligent design thing and force them to study biochemistry. Because yeah, there's a lot of beauty - but it's also incredibly random and messy and without anything that looks like consistent design. It's worse that design by committee.)
Optimization by natural selection is also one of those often misunderstood things. First off, there's the whole random mutation side of the problem. So you have to wait until something useful comes along, and then going with anything that's an advantage over your current state in your current situation. Which is a hell of a gloss, of course. There is also the tendency for genes with neutral effect on fitness or genes whose effects on fitness it below the current noise threshold (which is a function of population size, which is why you'll see the largest amount of drift in isolated populations, especially those under weird selective pressures - get a small enough population and genes with negative effects on fitness can become fixed) to become fixed.
Think of it this way: we're bipeds, which gives us a lot of advantages. But can you really say we're optimal bipeds? With the kinds of tendencies towards back and knee problems we have? I mean really, we're just a half-assed hack off the standard quadruped model. I mean, if this is about being optimal (or intelligent design) then where is my caesarian zipper, fer crying out loud?