People enjoyed the process of solving a problem.
Your present a false dichotomy; that mathematicians care about the result, or are rent seeker that just wants to play about with puzzles.
Many people enjoyed the process of finding things out for it's own sake.