The thing about math is we don't usually know what is pure fancy and what is civilization altering until far after the discovery. Once in a while it's a real targeted crack at something practical but most often it's collecting things which seem trial until you use them together and suddenly you have computers running LLMs.
If it were really just about funding people who like math to have fun then it's easy to do forever: just don't have them look at the results and keep paying.
What is their pay going to be justified by once computers start conjecturing and proving theorems on their own?