I also had this sort of thoughts when finishing my master's degree. I guess what breaks the cycle is that proofs (like other artefacts in other human activities) deliver aesthetic bliss.
There still seems to be a difference between useless pure math research and useless science or useless philosophy. Science, even useless science, still has a subject matter that is relevant to us independently of science, the real world. And philosophy studies concepts (like "knowledge") that occur in natural language and thought, and those concepts are relevant to us independently of philosophy. But pure math is entirely self-referential. Pure math abstractions are used only in pure math. Pure mathematics is relevant exactly to pure mathematics and those who study it.
There still seems to be a difference between useless pure math research and useless science or useless philosophy. Science, even useless science, still has a subject matter that is relevant to us independently of science, the real world. And philosophy studies concepts (like "knowledge") that occur in natural language and thought, and those concepts are relevant to us independently of philosophy. But pure math is entirely self-referential. Pure math abstractions are used only in pure math. Pure mathematics is relevant exactly to pure mathematics and those who study it.