Is there examples of mathematicians who had to lose years before proving themselves in the field? I'm asking since in most of the cases I noticed a steady career path for most of the mathematicians.
A large number of Mormon mathematicians have taken time off for a 2-year mission, including Jim Cannon (a founder of geometric group theory), Stephen Humphries (found minimal generating set for mapping class group), and Tyler Jarvis (recent Annals paper on string theory). Very little time is spent on math during a mission.
Vladimir Berkovich, as he writes "I finished studying in 1976 and got a Ph.D. a year later. Getting an academic position would be too much luck, and the best thing I could hope for was the job of a computer programmer at a factory of agricultural machines... As a result, I practically stopped doing mathematics." The context here being the he was Jewish in the Soviet Union and made trouble for him. He did not really start working on non-archimedean analytic geometry until 1985 and then did not really return to academia until 1987 when he was able to emigrate to Isreal.
The quote is from his introduction to: "p-Adic Geometry: Lectures from the 2007 Arizona Winter School" published by the AMS.
Not a theoretical mathematician but John P. Snyder was trained and employed as a chemical engineer. He came up with a map projection useful for a United States Geological Survey (USGS) satellite-based mapping system (Landsat), then was hired by them as a cartographer. He published several more map projections and recast others to take advantage of electronic calculators and computers.
He was over 50 when hired by USGS.