When you do it for a transformative purpose (turning it into an LLM model) it's certainly fair use.
But more importantly, it's ethical to do so, as the agreement you've made with the person you've purchased the book from included permission to do exactly that.
Reasonable minds could debate the ethics of how the material was used, this ruling judged the usage was legal and fair use. The only problem is the material was in effect stolen.