It could do the opposite, borrowers may feel that the late fees justify them keeping the book for longer, since they are paying for their excess usage.
I think that perhaps strong shame requires a social interaction. (However, I would also be ashamed to pick up my child late from daycare, so maybe my feelings aren't broadly representative.)
https://rady.ucsd.edu/faculty/directory/gneezy/pub/docs/fine...
(I teach this one on my behavioural econ course).
As said elsewhere, I don't think it's ever enforced, just as backup in case they have someone repeatedly taking advantage of them.
I've often arrived in the last 3-5 minutes. If you are late, staff are forced to hang around, cleaners potentially can't complete their job, etc.