PhD is granted for novelty, not practicality.
And this attitude, my friends, is the reason why so much software out there is so bad.
We need more of a math mindset when developing software. What can we be sure about, what are the invariants, what can we prove? There is so much crap out there that somebody lacking understanding just tried to wing, and I'm constantly ashamed of it.
Computer science is applied math.
Foundational research does often not provide immediate applications. Still, if we don't do it, out understanding of the world is lacking and it hurts us later down the road.
Math has no application until you find an application for it. Differential equations are just equations until you pair them with physics. Formal logic is just an abstract discussion of human reasoning until you build a circuit, etc.
A slight equivalent I can think about would be the emergence of neural networks. When I was working on my Masters on face recognition, neural networks were not the major force they are now. Facial landmarks used a combination of haar features and edge detection. These methods weren't outright abandoned, but if NNs had taken off during my research, then I would have had to restart my work.
This is one of the things I thought of right away when ChatGPT got released last year. "God, there's probably so many PhD candidates right now in NLP feeling despair like all their work was pointless ...as if million of voices cried out in terror and were suddenly silenced."
It's hard in the moment to know whether what you're working on has any utility. So just do your best and keep chugging!