Libraries I have seen are generally not allowed to bring bags in, and some libraries can't even wear too thick clothes. Because there is an anti-theft magnetic stripe in the book, if it is wrapped, it may not be sensed by the anti-theft device. This is a security measure for the library. China people have always felt a strong sense of security, so please forgive me first.
As for lockers, just like shopping malls, some are well made and some are poorly made, but generally it is good to take important items with you.