In math, the journey is often more important than the destination. The process of developing a proof may uncover new mathematical techniques, some of which may have practical applications in other fields. Even an attempt that ends up as a dead end towards the intended proof could produce something useful in a difderent area. But if you just get the proof directly, you miss other discoveries you could have made along the way.
Take the Navier-Stoke problem for example. Knowing that there are solutions that "blow up" probably doesn't have a lot of practical applications. Such solutions couldn't happen in a real system. But the process of finding that proof could result in increased understanding of how turbulence works, or new techniques for solving non-linear partial differential equations (which has a lot of applications in science and engineering).