By publishing half a result, the mathematician guarantees an AI will have the chance to build on their work and beat them. How do you expect these people to get grants if all they do is publish half solutions that machines poach?
Because it's more credit than nothing. Also, building on others' work is not "poaching".
Everyone stands on someone - or something - else's shoulders in some way. The way grants are awarded will just have to be updated. But even if grants totally disappear there will always be enthusiastic people working on and sharing X with the world just for the heck of it.