Yes you are right of course...sandals being a very good case of offering very little protection. However, all footwear does give some protection if there is any form of broken glass or crockery (or anything sharp for that matter) on the floor.
If you walk barefoot enough, you will eventually develop thick enough skin that is able to withstand glass a lot better than shod skin.