The question asks for data on why people leave research mathematics. I don't have any, so in a sense I can't really answer the question. What I have is personal experience and a reasonable number of anecdotes: I had a pretty good postdoc but I didn't even apply for tenure track positions, and a surprisingly large number of my colleagues made similar choices.

Granting the subjective nature of my experience, I would emphasize that all parameters in the naive expected payoff computation come into play, not just the probability of success:

$$\mathbb{E}(\text{Stay in math}) = \mathbb{P}(\text{Tenure}) \text{Payoff}(\text{Research}) + (1 - \mathbb{P}(\text{Tenure})) \text{Payoff}(\text{Non-Research Job})$$

My generation of math PhD's had the harrowing experience of being one of several hundred or even upwards of a thousand applicants for one or two postdocs, and it doesn't get much better for tenure track jobs. Moreover public investment in research and postsecondary education appears more likely to decrease than increase, at least in the US. So the probabilities are quite discouraging.

But what I want to emphasize is that the payoff for non-research jobs is quite high these days, and this is just as important for many people. I and a solid majority of my colleagues who left research mathematics did so not for finance but for data science. Engineering advances have left businesses in all industries with literally more data than they know what to do with, and for the time being they are convinced that it is worthwhile to hire people with strong mathematical and scientific credentials to help sort it out.

Unlike mathematical research where it is typical to spend years working on something that only a handful of people can appreciate, a data scientist can have an impact which is recognizable to people outside of math or science in 6-12 months. And a lot of beautiful ideas are involved - information theory, functional analysis, convex geometry, graph theory, and even a dash of topology all arise nontrivially. The fact that there are many more openings than people to fill them is icing on the cake.