Art is typically quite style-promiscuous, and mostly protected by copyright. It’s also quite analog/continuous. Code is more discrete; you can diff it and easily see if an AI copied a particular block that doesn’t appear in other projects.
Personally I don’t think there is a strong argument that training an AI on art is problematic, as long as the AI doesn’t then commit copyright infringement. I think this process is equivalent to art students consuming art and synthesizing their own styles.
I think it’s more problematic if AI starts regurgitating discrete chunks of FOSS code, since that’s probably a license violation.
For digital artists, lots of skills are going to become irrelevant; the raw skill of pixel pushing and line work may well become obsolete. But the hardest part was always having good taste, composition, ideation. These are not going away any time soon.
And if you enjoy pushing pixels around, nothing to stop you doing that; we still play chess for fun even though computers dominate humans at the task. Indeed, computers make very scalable and accessible coaches; one could argue that chess is more fun, and easier to learn, now that computers have superseded humans. Perhaps the same will be true about art, and later, coding.