Here's the point: when people solve problems, they come together and create a community to eventually use the new knowledge in positive ways, including inspiring younger mathematicians by sharing insights. The human element is key and it's not just about solving problems. People only think that because we've been conditioned by computers to value answers more than how we got to them.
But if AI can solve any problem and existing mathematicians just use AI to solve problems for the sake of solving them, the community itself with wither and so will the interest in mathematics and over a longer period of time, it will just become soul-less and uninteresting and the entire community powered by the fire of fascination will simply die.