Teachers generally shouldn't look through your bag without permission because it's your personal property. There might be exceptions for safety reasons, but they usually need a good reason to do so.