Earlier quoted context omitted.
It's much easier to wear shoes than avoid all automobiles. Public places require shoes for hygiene reasons, not for book-dropping incidents.
What “hygiene reason” are you thinking of? In the general case it doesn’t seem any more or less hygienic to touch the bottom of my shoe to the library floor vs. the bottom of my bare foot. Both are going to be comparably dirty if I walked in off the sidewalk (the foot is probably a bit cleaner on average). If the worry is something like fungal or bacterial infections of the feet, those thrive in the warm, wet environ…
The hygiene of your foot, not their floor, i.e they don't want you walking on their (relatively) dirty floor bare-foot.
Also, if they allowed others to walk in bare-foot, gaping sores etc would make the floor dirtier.
I'm pretty sure they don't "allow" you to vomit on the floor, or throw rotting food onto it either, but if you did that (unintentionally?) I'm sure they would clean it up and disinfect the floor, for hygiene reasons. That people might track those things in in trace amounts is why the floor is considered dirty, and why it is probably cleaned periodically.