For me it's a bit more than accepting it might happen. If someone is so hungry that they have to steal bread, I hope they will steal my bread. For two reasons: bread is a really basic necessity. You starve if you can't eat. Fortunately almost nobody is that desperate, but if they are, I can't blame them for trying to stay alive. Secondly: bread is cheap. I can easily afford to lose some and not care. If it helps someone stay alive, then I'm glad.
And I'm not the only one who thinks this way. A Dutch bishop has said something similar a decade or so ago. To some controversy, because condoning crime, but if your life is at stake, you've got to do what you've got to do. Of course society has some responsibility to ensure nobody ever gets that desperate, and seems to be doing a reasonable job at that, since nobody has stolen my bread yet. But if they did, I'd be fine with it.
To get back to the original topic: I don't think sanitary pads and tampons are quite on the same level of bread, but I still don't see theft from public toilets as a serious source of concern.