That's the entire concept of a public library.
Libgen and the like tend to just have more on hand though, and that's the big differentiator in usability IMO. There are things your local library just isn't going to have a copy of but libgen will. After that happens once, why bother with the library again? Outside of "it's legal" or "I find more moral" type concepts there tends not to be a strong reason.