You're hand-waving away the most critical part of copyright: the "copy" part.
A physical library purchases a physical copy of a book. Thanks to the First Sale Doctrine, they can do whatever they like with that physical copy. They can temporarily transfer possession of it to someone else ("lending"). In doing so, they take the risk that they won't get that physical copy back. If someone doesn't return a book, the library has to purchase another copy to replace it.
Internet Archive made a digital copy of the physical book. That, in itself, is a copyright violation (unless it was done under the few fair-use exceptions, which don't apply in this case). IA now had two copies of the book, but only paid the publisher and author for one copy. They then "lent" a copy to someone else. Being a digital file, this didn't involve transferring sole custody of the digital copy to someone else; it meant making another copy of the work. Now there's three copies extant with one paid-up license. And if someone failed to "return" their digital copy? IA still had the original physical copy and the original digital copy; they didn't "lose" it to the "theft." That, right there, is where a fair jury following the law would find them guilty of copyright infringement.
(You can argue that the law isn't right or fair, but it is the law unless and until changed...)
DRM—even if IA had used it consistently, which they didn't—doesn't fix this. IA still had to make an unlicensed copy to digitize the work in the first place, and a DRM-laden "lending copy" is still a second infringing copy.
They could've worked with the rights-holders to negotiate a license allowing them to do this; they didn't. They relied on a flawed "fair use" argument, and it bit them.