Mathematicians learning from applications to other fields Once upon a time a speaker at the weekly Applied Mathematics Colloquium at MIT (one of two weekly colloquia in the math department (but the other one is not called "pure")) said researchers in a certain area of mathematics thought that their work could be of value to some field other than mathematics—maybe it was some kind of engineering, so I'll just call it "engineering"—but then it was found that interactions between engineers and mathematicians made substantial contributions to mathematical research but not to engineering. I don't remember what it was about, beyond that.
So my question is: What are the most edifying examples in recent centuries, of applications to fields other than mathematics greatly benefitting mathematical research when mathematicians had expected to be only the benefactors of those other fields?
 A: If Fourier analysis came from the study of heat flow, then, although the benefit to engineering and the sciences was immense, so was that to mathematical research.
A: If I may substitute "physics" for "engineering", one could argue that string theory is an example of a topic where mathematicians have interacted with a different field of research and the dominant benefit of that interaction was in mathematics (witness the award of a Fields medal to a physicist).
A: I think the best example for interactions between engineers and mathematicians is FEM —Finite Element Method— and FEA —Finite Element Analysis—.
The finite element method (FEM) for solving partial differential equations in 2 or 3 spatial variables, comes from the need to solve difficult elasticity and structural analysis problems in civil and aeronautical engineering in the '40s which inspired Alexander Hrennikoff, structural engineer, and Richard Courant, mathematician to develop FEM at its early stage.
FEM obtained its real taking off in the '60s and '70s by the work of J.H. Argyris (University of Stuttgart), R.W. Clough (UC Berkeley), O.C. Zienkiewicz and many more.
Distinct formulations share one essential feature: mesh discretization of a continuous domain into a set of discrete sub-domains, called elements. A finite element method is characterized by a variational formulation associated to the miniminization of an error, a discretization strategy to build such mesh, solution algorithms and optionally a post-processing scheme. The main advantage of FEM over other methods for solving PDEs is that it allows to model physical processes over very complex geometries.
Recently several mathematicians, Zlamal, Wachspress, and Ciarlet & Raviart, among others, have extended the analysis of FEM to include elements with curved sides.
Although FEM has a big impact on the Engineering side, it must be acknowledged that it has also made substantial contributions on Mathematical Methods for PDEs, Optimization and Algorithm Development, being an active area of research until today.
A: Not sure if this is what you had in mind, but experiments on the random packing of tetrahedral dice were able to achieve denser packings than had been constructed by mathematicians at the time.  Both engineering and mathematics have played a role in this subject, but arguably mathematics has been more enriched than engineering.
