If I suddenly have to think really hard at my job all day and do terribly if I’m undersea and still get paid the same or less, I will be left pretty bitter.
(Not a serious suggestion, but I do see this in the wild a lot)
Maybe I'm the one who is ultimately a sucker, because I take too much pride in my work to do this
But I always thought that the quality of my work and my effort would be tied to my reputation, but I don't think the world works that way unless you are very well known somehow
An analogy: any idiot can take a calculus class today, but it took Leibniz and Newton to come up with it in the first place. (And even those geniuses didn't do it properly: it took until the likes of Karl Weierstrass and friends to put analysis on a firm footing.)
In the real world, the resulting code that correctly and efficiently solves a problem ends up being unique enough such that an AI wouldn't learn much even if you fed this result back in. It's just going to average away all the important parts that made it correct.
If real world code wasn't so sparse and time consuming to develop it wouldn't be so valuable in the first place. Not to mention the fact that the maintenance is what you really care about and where the real costs are. Application code doesn't stand still.