What is the "purpose" of pure mathematics?

I had a similar existential crisis a while back and hopefully this answer is symmetric to yours. I think first to justify studying mathematics you have to get to the foundation of what math is (or at least what math is to you). Math at the most simple is the application of logical rules to a set of axioms. From those two things the mathematical community builds a system of logical truths. This system is not just the result of human logical understanding it is the height of human logical understanding. The structure of math becomes the structure of the definite ways that a person can look at the world and find truths. In this way mathematics isn't just abstract structures we cook up in our heads it is the collections of the ultimately provable methods of thought. The ways of thinking that math gives us may be applied to the real world or may not be. With that definition what math "is", we can answer why you should research it. The incredible structures that math has created to further human thought are not the result of a few super geniuses they are the result of normal average mathematicians who prove one or two little things. Together the whole community of mathematicians builds the huge system of ways to think that are logically consistent. Personally I am satisfied just being part of the community that is working on the greatest intellectual project in human history. I also find it affirming and freeing knowing that since all mathematical proofs are important to math that any work I do is also important (though it may not be surprising or novel). This answer may be more ars gratia artis then you were asking for but it'd the answer that I found when I had a similar crisis.

/r/math Thread