It's natural to want the respect of your peers, but if you extend your peer group to encompass all of humanity, you'll almost certainly fail. The impact you can realistically expect is much smaller, recognized only by a few people who happen to share similar interests. You were never going to be a world-famous chess player, but you can be a worthy opponent for your chess friends. You were never going to make a fortune selling knit sweaters, but you can still have your knitting circle congratulate you when you finish another one. And you were never going to prove the Riemann Hypothesis, but you can still have math friends listen to your exposition of some related theorems.
I think people who have the wisdom to be content with this will continue to do math for the same reason people continue to play chess and knit. Someone, whether human or machine, being better than you at something doesn't have to take away your enjoyment of it.