Companies are allowed to train on copyrighted works - or, to be more precise, there is no prohibition in copyright law on them doing so. On the other hand, there are no particular protections.
The real question is to what extent an AI generator can return its copyrighted training data as a non-de minimis output. In other words, can I get one of the existing copyrighted works by putting in a prompt? This is something that AI developers are trying to avoid, but it's actuallg a pretty tricky problem.
Allowing AI output to be copyrighted is one of the worst ideas in copyright. Thankfully, the US Constitution as interpreted by the courts only allows for copyright to inhere in works of human creativity.
By the way, while I'm very excited about certain "AI" things, I have a very poor opinion of the merit of generative AI — and I mean in theory we well as how it stands today.