You are obviously not educated on this.
It did not “learn” anymore than a downloaded video ran through a compression algorithm. Just: LoLz.
You can digitize the books you own. You do not need a license for that. And of course you could put that digital format into a database. As databases are explicit exceptions from copyright law. If you want to go to the extreme: delete first copy. Then you have only in the database. However: AIs/LLMs are not based on data bases. But on neural networks. The original data gets lost when "learned".
The LLM is not repeating the same book. The owner of the LLM has the exact same rights to do with what his LLM is reading, as you have to do with what ever YOU are reading.
As long as it is not a verbatim recitation, it is completely okay.
According to story telling theory: there are only roughly 15 different story types anyway.