I bought very few textbooks (Physics degree) but heavily used the ones available in the library, clearly YMMV.
I take your point that if the e-books are available via the library, they will charge the library, probably on a pay as you go basis too
I'm only aware of it because my wife went back to school to completely change field (microbiology now, rather than software)