In some libraries you pay an annual membership fee, not dissimilar to the flat monthly fee paid to Netflix (and now Oyster), as opposed to the per-rental fee Blockbuster used to charge.
University libraries are funded by tuition, and may allow non-university access for a fee.