"The training use was a fair use," [the judge] wrote. "The use of the books at issue to train Claude and its precursors was exceedingly transformative."
However, the judge ruled that Anthropic's use of millions of pirated books to build its models – books that websites such as Library Genesis (LibGen) and Pirate Library Mirror (PiLiMi) copied without getting the authors' consent or giving them compensation – was not.
It seems clear from the article that while the use of pirated works was illegal, the use of copyrighted works (a the work a book is based on is still copyrighted if you buy the book) was fine and transformative.