If an AI can make 100 commercially unviable discoveries (for now) on its way to each immediately commercially viable discovery, that's great - bank them in the discovery library for later.
Still doesn't mean we need mathematicians doing everything with pencils instead.
This is mostly false. There are certainly some famous cases where math pursued for theoretical reasons later resulted in major practical applications but historically a great deal of math was developed either in response or alongside practical problems with anticipated real world applications, with war, industry and commerce being the major drivers.