Libraries track what books you read (nowadays via some database and in the past via paper)

They track what you lend, not what you read. Many people just read on location.

I guess it depends on the library.

When I was writing my masters thesesis most rare books had to be requested - they wpuld bring them from the archive.

The books you could freely take was mainly Stephen King and year 1 stuff.

They registered what you requested and returned (to prevent theft)

Unless you read it directly at the library (at least in my country), without borrowing it.