From an admittedly loose definition, libraries are "banning" books all the time.
Unless a library has an unceasingly philanthropic supporter named Musk, Bezos, Buffett, Gates, Zuckerberg or the comparatively impoverished Waltons, it simply can't afford every one of the 2 million or so books published worldwide every year.