In number theory you study properties/patterns of the numbers. This is an example of such a property.
These properties often seem like they don’t have any applications, and often they don’t, but not always. For example, cryptography is basically all based on number theory.
I watched a great series once on generating ~prime numbers which explained how to use number theory to check a randomly generated number for a probability of being prime. By using a bunch of weird rules, you can be ~99% sure it's prime without having to do huge computations.
It's possible that solving this problem in a satisfactory way would teach us something useful about number theory, that's useful in real world practical stuff.
Andrew Wiles' proof of Fermat's Last Theorem is based on the modularity of elliptic curves. I'm not sure to what extent Wiles' proof contributed to elliptic curve cryptography hitting the scene a decade later, but it probably didn't hurt.
Like a lot of these "cute" problems, finding a proof of the problem requires a new theorem or novel application of a technique which benefits mathematics overall.
As a prime example, Fermat's Last Theorem was not a particularly applicable mathematical theorem. But when Andrew Wiles found a proof, he ended up proving several other elliptic curve conjectures which were important to the field.
Why do we care if every integer not equal to 4 or 5 modulo 9 is the sum of three cubes? Just for fun?