Used to work at a grocery store and it is definitely rational to peek inside to make sure the goods are all intact. Even the fancy expensive eggs that are packaged like Fort Knox come in broken sometimes. This didn't bother us.
Please don't block the whole case while you open carton after carton swapping eggs to get the perfect dozen. Please don't make a mess of the shelf digging all the way to the back for the freshest eggs/milk. You might find something a couple days fresher, but you are slowing everyone else down. There's not a magic carton that won't expire for eight months back there.
Also, don't ask the stocker if they have anything fresher In Back. The back stock isn't some magic endless space where we hide all of the freshest/best stuff. It's probably cramped and organized so that the newest stock is rotated to the back/bottom of a stack, so digging through it just for you is a big waste of everyone's time that will potentially fuck with inventory.
I used to laugh at the segment of Clerks that rants about what I just did, but after working at a few different stores, people are absolutely like this.