I would like to know some examples of interesting (to the layman or young student), easy-to-describe examples of mathematics that has had profound unanticipated useful applications in the real world. For my own purposes, the longer the gap between the theory and the application, the better.
My purpose is to explain to the people I know why studying theoretical mathematics isn't a waste of time, and more importantly to motivate students. The reason I would like to have a longer time gap is that I want it to be clear that the mathematicians could not possibly have had the future applications of their work in mind.
A good example of this is Robert Lang's TED talk about origami, in which he describes how origami artists applied circle packing to their own work to construct designs, and how later engineers used origami to construct devices that can be transported compactly and then unfold to fill a larger space. His premier example is that of transporting large telescope lenses into space; since they are made of glass, they have to be carefully folded, and not just stuffed into a canister.
Other examples are how number theory was developed and later used in cryptography, and how polynomials were studied and later found to be useful in all sorts of applications. These have drawbacks, however. Cryptography and its uses in computer science are basically still math, and it's quite complicated. It's also not so clear that people studying polynomials weren't aware of their many potential applications.
Are there other good examples that fit my criteria? I think the latter two examples I mentioned could also be good examples, if presented correctly, but I'm not sure how best to go about that (and I am most interested in hearing of other connections).
Edit: If my motivation (or its wording) bothers you, please just ignore it and instead note that surprising later applications and connections make for interesting and engaging talks.