If most of lending were made up of educational texts, there would be a social value. Some people describe bodice rippers as porn for women, and people get addicted to them in the same way they get addicted to porn.
Would a library ever lend porn out? I'm guessing no, because of the lack of social value. To the extent that bodice rippers are like porn, the same rationale would apply.
Nope, because even if bodice rippers are not pure porn, it's not clear why libraries should subsidize entertainment for patrons. I'm not saying it's a terrible use of taxpayer money, just disagreeing with OP who said it's "such a great use of tax money". It does not bring people together, educate them, or provide for the common defense. Why not have movie theaters be government-run? It would make as much sense as providing free smut-adjacent books for (almost entirely) women.
Why not?
> Some of the services end up being very expensive, like ebook lending
We need something like a first-sale doctrine for electronic media. Blockchains would be ideal for tracking ownership.