Franka Bruns / AP

The Harry Potter website known as Pottermore has been beset by delays. But there is some good news. When the portal launches later this year, its stock of JK Rowling e-books and digital audiobooks will be available to public library members.

This coup for borrowers was the result of an agreement between Pottermore and OverDrive, the largest distributor of digital content to libraries. But OverDrive is more than just a library partner. It also will provide the sales platform for buyers to purchase e-books on Pottermore.

This latest e-book tale takes place in a largely hidden, but fairly volatile, corner of the market. In recent months, publishers have played hardball with library systems in an effort to protect profits. Earlier this month, Penguin announced that it will not distribute new e-book and digital audiobooks to libraries after it severed ties with OverDrive, which recently had contracted with Amazon to offer titles from more than 11,000 library catalogs. That number has reached more than 60,000. Penguin also created hurdles for Kindle users to access already circulating e-books by requiring that they be downloaded onto a computer and transferred to an e-reader through the USB port.

(MORE: Barnes & Noble is Betting it Can Compete With Amazon)

These developments follow a pattern in the e-book business. Macmillan, Simon & Schuster and Hachette do not offer libraries access to e-books. Last year, HarperCollins created a firestorm marked by petitions and boycotts when it enacted a 26-book loan policy: For every 26 e-books loaned to borrowers, the library would have to buy a new copy. Few libraries have hit that limit, according to reports. Random House is the only publisher that offers unlimited access, and the library “bestseller” lists reflect this. But even Random House will raise prices for wholesalers such as OverDrive, 3M and Ingram on March 1. A spokesperson for the publisher called its commitment to libraries “emotional” and “practical.”

This dedication increasingly is rare. Publishing executives fear that e-borrowing leads to fewer library visits and less exposure to new titles. Publishers also worry that e-book lending crosses geographic lines, allowing unrestricted, worldwide lending. Of course, borrowing a book from, say, the New York Public Library while living in Turkey would require the Turkey resident to apply for a library card, which requires proof that the applicant lives, works, pays property taxes or attends school in New York State.

Ample evidence suggests that publishers’ wariness of libraries is misguided. Libraries facilitate direct purchasing and “discoverability” of new titles and authors. An October survey of library visitors and e-book usage found that more than half of all library patrons purchase books by authors they first found in the library. More than 40% of “Power Patrons” –members who visit the library weekly and feed most of its circulation — purchased a book previously borrowed from the library. More than 60% bought titles by an author they previously read as a result of borrowing from the library. More than 80% of users read books over multiple formats.

(MORE: What TV’s Pawn Stars Teaches Us About Good Value)

In any case, the stakes are high and getting higher for libraries and publishers alike. Digital checkouts at libraries have risen more than 100% from last year. Devoted readers increasingly have other options that don’t require purchasing books: There are rental sites , and Amazon now offers a book rental service for “Prime” subscribers. But devoted library patrons are unlikely to be swayed from borrowing when they find what they need.

The dispute, though, reveals a larger tug over the role of libraries in the 21st century. There certainly is no shortage of library members. The Bureau of Labor Statistics reports that job prospects for librarians are favorable. But the sanctity of the library might shift if it continues to be prevent members from getting the most variety of what is still the library’s most treasured item.

Libraries now suffer from a unique form of disruption. For thousands of years, their primary purpose was lending books. Since the onset of digital content, this role has been usurped. But libraries likely will continue to serve as a collector, aggregator and keeper of a community’s traditions and secrets. They also will continue to be an informal gathering place, one where services like tutoring and day care are sought. Libraries already are digital destinations. But it’s the human connection that compels members to return in droves. That is why libraries will endure.

MORE: Personalized Magazine Apps: Cutting the Web Down to Size