We touched on introns and exons in my bio class, but unfortunately we didn't really talk about why Eukaryotes have introns. It would seem they would have to have some purpose since prokaryotes do not have them and they evolved first chronologically, but I could easily be wrong. Did the junk sections of DNA just evolve there by some sort of randomness or necessity as opposed to an actual evolutionary advantage? Why hasn't evolution stopped us from having introns since they seem to be a 'waste' of time and DNA? Why do prokaryotes not have introns?
There is still a lot to be learned about the roles introns play in biological processes, but there are a couple of things that have been pretty well established.
- Introns enable alternative splicing, which enables a single gene to encode multiple proteins that perform different functions under different conditions. For example, a signal the cell receives could cause an exon that is normally included to be skipped, or an intron that is normally spliced out to be left in for translation (the Wikipedia article on the subject has a basic overview of the possibilities). This would not be possible, or at least would be much more difficult, without the presence of introns.
- In recent years, we have discovered that RNA molecules (especially small RNAs such as siRNAs and miRNAs) are much more involved in regulating gene expression than previously thought. Often the small regulatory RNAs are derived from spliced introns.
There is probably more, but essentially introns enable a finer level of regulatory control. Biological complexity is often not the result of having a larger complement of genes, but of having additional layers of regulation to turn genes on and off at the right times. Prokaryotic genes are often organized into operons, and a single polycistronic mRNA will often encode multiple proteins from multiple adjacent genes. Since the biological processes required to sustain microbial life are much less complicated than those required to sustain eukaryotic life, they can get away with much less regulatory control.
Evolution - Douglas J. Futuyma, Chapter 19, p. 461
Michael Lynch and John Conery (2003) have pointed out that a variety of genomic features that appear to have little fitness advantage for organisms-introns, transposable elements, large tracts of noncoding DNA-may be more prevalent in species with small effective population sizes. They have suggested that viruses and bacteria have extremely large population sizes that facilitate the sweep of advantageous mutations that enable genomic streamlining. By contrast, eukaryotes have smaller population sizes that facilitate the fixation of nonadaptive traits. This is the best hypothesis advanced so far that would explain the diversity of genome sizes and structures.
Prokaryotes can't have introns, because they have transcription coupled to translation. They don't have time/space for that, since intron splicing will stop the coupling. Eukaryotes evolved the nucleus, where splicing can be done. The ancestor of eukaryotes that developed the nucleus could afford more variability (because of introns) than species without it, so they had a greater fitness.
Bacteria can't afford high complexity compartmentalization, a process that requires a lot of available energy per gene, a eukaryotic cell can have tens, hundreds or even thousands of mitochondria that have similar energy output to a bacterial cell, while having a genome about 100-500 times smaller (16 kb of a human mitochondria compared to 4.000 kb for a E. coli cell).
I hope that clarifies your doubts, and you can see that this is a debatable answer.
Sorry for my bad English.
There are several good answers here already. Daniel Standage points out the value of alternate splicing. For a compelling example of the role in regulation of gene expression, read one of the reviews of sex determination in Drosophila melanogaster (sex-lethal, transformer, doublesex).
None mentions the idea of exons as "cassettes" of reusable function that can be introduced into an existing gene during evolution.
The bounding introns represent regions where inexact "grafting" can occur without destroying the already functioning reading frame of the newly introduced xeno-exon (I just made up that neologism) or of the recipient gene.
In other words, introns provide regions which allow for sloppy transposition of functional subunits while reducing the likelihood of wholesale chaos at the transcription/translation level.
Evolution shows over and over that it is capable of promoting mechanisms that promote evolution. How else can you explain meiosis?