Not always and not without attribution on copywrited works. And the question becomes how much is used as well. Ever get the excerpt warning while posting on FR> there’s a reason for that.
A computer AI is allowed to learn the same way a human does by looking at all available public information.