@prologic@twtxt.net Google scanned all kind of books, to improve their search results - letting people find books and studies, based on any of the text in them, while not having the content of the books freely available, for obvious legal reasons.
Despite only doing that, it still resulted in a big lawsuit, that dragged on forever, then settled, only to be brought back to court again. Eventually Google won, more or less because their service did more good, than harm, for both book sales and people looking for books to do book things with.
This case was also recently brought up by many, when some artists filed a class-action lawsuit against Stable Diffusion and Midjourney, for their AI, trained, using copyrighted images.
This is just a “brief” and maybe not entirely accurate summary, mostly based on this stream, by Uncivil Law, who is a real lawyer and surely more qualified to talk about this, than I am: https://www.youtube.com/live/CwTWwvLRdeo