But as a way to build "brain muscles", and serious appreciation for how complex both the world and abstract systems can easily be - advanced math is a cheap (for society) degree. No field work, fancy instruments, nor laboratories, as most sciences require. No auditoriums / theaters / etc., as arts & music generally require. Nor...
And at least back when I was in grad school, $College's need for TA's for the intro-level math courses (that many other fields of study required) made it really easy to pay the bills.
If you didn’t enjoy it, well good to know as well. Quite a few of us chose a suboptimal major for our current work, not the end of the world.
I have also worked with amazing developers that couldn't do simple addition in their heads.
Math is an extremely powerful tool that most people do not understand how to use and thus do not "need" to use.