For contrast, I went the other direction. I taught middle and high school math, then got an MS in math (really enjoyed TAing) and started programming. I really appreciate the intellectual stimulation; I love the fast pace with which ideas evolve in the community. But I miss being that teacher who helped someone "get" math.
One of the coolest experiences I've had: one of my students managed to end up in my class for 6th, 7th and 8th grade math... Then 7 years later I hired her as an intern! She totally crushed the internship. Meaningful relationships with students like that, where they still check in occasionally and give me updates on how they are doing and tell me how I changed the way they see things... that is something I miss a lot.
For what it's worth I still think pretty often of my high-school math teacher who helped me "get" Calculus, almost 20 years ago. I wouldn't have my current programmer job and interest in abstract things if it weren't for him.
One of the coolest experiences I've had: one of my students managed to end up in my class for 6th, 7th and 8th grade math... Then 7 years later I hired her as an intern! She totally crushed the internship. Meaningful relationships with students like that, where they still check in occasionally and give me updates on how they are doing and tell me how I changed the way they see things... that is something I miss a lot.