You are overstating there by a long shot. The guidelines are more along the lines of "if you have completely failed at making the police go away in any of the previous 72 steps, then you must comply, but hopefully you read our other guidelines that tell you it's a good idea to not create any records and if you must, to dispose of them frequently."
Many have a policy of destroying records immediately after books are returned unless you request otherwise (eg to be able to see your borrowing history in your account.)
My sense of most libraries doing that is more anecdotal than quantitative. Mostly just what I've heard from librarians and my experiences signing up for library cards various places that had some sort of relevant T&C clause or opt-in process.
They do present/display/advertise their most popular books. They track and fine you if you keep a book too long. They determine how much a book has been checked out and track usage at an analytics level to determine if the book should be taken out of circulation.
Maybe search engines should have a special status like libraries enjoy, but it's worth noting the centuries it took for public libraries to become a municipal requirement.