A grocery store is probably the first place that gets looted when society breaks down. Locking up there wouldn’t do you any good.
Well, that's a good point. I'd hope that not everywhere would get looted. Or maybe I'll just plan to be the first to loot and carry enough home to survive at home for a while.
But the main point is that in almost every zombie movie, the main characters are safe for a while in the middle of the movie somewhere where the zombies can't get them, and then they just have to go and mess things up and leave, or call attention to themselves.