It's not just librarians, but many states have laws protecting patron privacy around what they have read.
https://www.ala.org/advocacy/privacy/statelaws