Who benefits from mining?
Its not a math problem. Its just search for partial collision in function called sha256.

Sha256 is a famous type of puzzle.

During the writing of this post, a block  397108 was mined.

The solution looks like this:
00000000000000000497b28e9c38673ef8fd2fed317d6eca8a579350b1cba0a6

Notice the zeroes on the beginning. The more zeroes the harder is to find a solution.

The only reason is to waste power to prevent creation of funds from thin air (prevent print too much money) and to confirm payments.