If I'm not mistaken AI work was just recently considered as NOT copyrightable.
So I find interesting that an AI learning from copyrighted work is an issue even though what will be generated will NOT be copyrightable.
So even if you generated some copy of Harry Potter you would not be able to copyright it. So in no way could you really compete with the original art.
I'm not saying that it makes it ok to train AIs on copyrighted art but I think it's still an interesting aspect of this topic.
As others probably have stated, the AI may be creating content that is transformative and therefore under fair use. But even if that work is transformative it cannot be copyrighted because it wasn't created by a human.