As an academic mathematician-turned-software engineer, I can assure you my reasons for leaving academia were not a “monomaniacal focus on financial gain”. The money and job security didn’t hurt, but the real turning point for me was solving the two-body problem.