You need to pay for the books before you memorize them
The government is in full support of this "lending" concept, in fact they have created entire facilities devoted to this very concept of lending out books.
Point being that the library prevents you from checking out 500gb because of logistical issues. First how can you carry all those books and how can they let other patrons in the library check out books if you grabbed that many? These rules aren’t enforced to prevent “scale” hence why my methodology got around the rules.
As long as you obtain the books legally then it's legal
This really isn't that hard
For the rest of us, we understand context