I remember hearing a hypothesis that "junk DNA" acts as a kind of shielding against mutations. From a probability standpoint, the more non-coding DNA you have, the less likely an error is to hurt the lifeform. Taken to an extreme, if every DNA sequence did something a singe error would cripple the organism.