A typical mathematician does not actively try to be useful. Individual mathematicians are motivated primarily by a subtle mixture of ambition and intellectual curiosity, and not by a wish to benefit society, nevertheless, mathematics as a whole does benefit society.
Timothy Gowers