An excellent, but now quite old, analysis in The Atlantic about how the New York Public Library has embraced digital innovation. Well written and engaging throughout.
I'm going to give you the conclusion to this article here to solve the tl;dr problem. There are two things the library has done to create such cool projects. First, I'm convinced the NYPL is succeeding online because of desire. The library's employees care about the digital aspects of their institution, and the institution supports their innovation. I mean this in the most fundamental way possible and as a damning critique of media companies. Second, the library sees its users as collaborators in improving the collections the library already has. While serving them online costs the library some money, they are creating value, too, by opening up conduits into the library for superusers.