I don't know if we can say that transpoons, for example, never had a purpose.
We can say that, as mammals, they never had a functional prupose, but what about before that?
Here:
Transposons, and ENCODE
We previously examined transposons in our series on “Junk DNA.” In brief, these are parasitic DNA sequences that serve to replicate themselves and spread within genomes. They have sequences that act to recruit host enzymes for making mRNA and a protein enzyme that acts to copy and/or move the transposon to a new chromosome location. These entities are veritable beehives of biochemical activity, but biologists consider them non-functional (with respect to their hosts) even if they are highly functional (with respect to the transposon). In many cases, however, transposon sequences in mammals are defective—they have picked up mutations such that they no longer make the enzyme they need for movement, or perhaps the mutation ruined one of the DNA sites the enzyme binds to. As before, these sequences are non-functional with respect to their mammalian host—they make no contribution to the host organism at all—and they are non-functional even to themselves (since the transposon cannot replicate any longer). Even such doubly non-functional sequences, however, will retain detectable biochemical activity. Host DNA-binding proteins will still bind to these sequences, mRNA may be produced, and even the transposon enzyme might be partially made as a non-functional protein. These biochemical activities may persist for thousands of generations before additional mutations silence them, so these sequences would still be identified as “functional” according the ENCODE criteria. Since almost half of the human genome is made up from such repetitive sequences, it’s not surprising that ENCODE found so much “function.” Yes, these sequences have detectable biochemical activity, but that’s not surprising at all, given what we know about transposons. Nor does such activity demonstrate that these sequences are functional in the more strict sense. Indeed, lines of evidence from comparative genomics strongly suggest they are not.
On "junk" in the genome:
http://biologos.org/blog/series/understanding-evolution-is-there-junk-in-your-genome