Libraries pay higher rates for ebooks than the retail price. They have to renew the license. A publisher can choose not to license their ebooks to a library if they want. Each license can only be lent to one person at a time and there are usually time limits.
In other words, it's completely different in every way.
I know publishers are working very hard to take back the first sale doctrine on eBooks. I’m talking about actual books in libraries not eBooks.