Why do so many pure math PhD students in the USA drop out or leave academia, compared to applied mathematics PhDs in the USA?
Only my personal experience, but I hope it will help you a little bit:

I am almost in the exact situation you describe in your question. I finished my PhD in Algebra (coding theory, lot's of linear algebra and representation theory) and am now working as a software developer. As a fun fact, this wasn't always planned. When I started my PhD, I was still dreaming about getting a PostDoc and ending up as a tenured prof at a prestigious university.

For me, personally, there were three reasons to take this step:


The PhD was quite hard and taxing on my mental health. Having a rather theoretic topic, you sit at your desk all day and try to come up with an idea. There is often no way to track progress for a long time, as you either have a clever idea or you don't, you can't set up a step by step plan to see if you are doing ok for such things. There is also always the fear that you simply won't have the right idea before your time/funding runs out. Due to that reason, I decided already some time before finishing it that I will run from academia without looking back as soon as I am done.
Closely related to the first reason, I wanted to do something more applied. I found a job where I can use my skills to really help people/the climate/... (our company develops AI solutions for agriculture, allowing farmers to better use resources and minimizing the need for pesticides).
I still plan to become a professor, one day. But after that experience during the PhD, I'm aiming for a position that is more focused on teaching and applied research (e.g. with industrial partners). For this, at least here in Germany, you need some years of industry experience.