And those licenses expire, and are more expensive than physical books.
And of course, not every print book is available digitally, and not every ebook is available from the small number of vendors that license ebooks for borrowing to libraries.
The third party ebook vendors libraries make people use for ebooks loans can also require accounts and collect data on library patrons and what they read to use for marketing, push ads, and/or to sell. None of that bullshit happens with physical copies are loaned out either.