| stealing from a thief's stolen stuff is not legal
So they aren't stealing, even less so than those who share the content online originally. Traditionally google was just providing a way too find it, and being able to find it means having to crawl it, and index it, indexing has always involved storing a copy or at least a partial copy.
So those copies exist, and that's a good thing for search and access to information, and knowledge. It even helps companies issue dmca take-down requests for their copy-written material.
As it get's into AI models it get's a bit greyer... but at the end of the day there is nothing even remotely close to a resemblance of any original source in a model. If you read a stolen book, you're not breaking the law if you use the information you learned.
​
And debatable if google used pirated books, they already have
$1 with 40m+ books already indexed in text. Did openAI and meta, and tons of others, almost certainly. Is this illegal, it's hard to say... I would no. Was it necessary to compete with google, absolutely, is it a net benefit for humanity, yes. For competition and lower barriers to entry I hope google wins the lawsuit.