Typically the big LLM providers write in the their ToS that it is prohibited to use their output to train another LLM.

Whereas for a book it is fair use.

ToS are usually not worth the toilet paper they're printed on. They're not legally binding.