Buying expired food is no fun. And even if you’re not buying expired food, you might be buying food that will expire more soon that the rest of the stuff on the shelf.
I used to just grab the front box or bag or whatever on the shelf and look at the expiration date. If that date was in the future and I figured I would eat the food before that date, I would buy it.
But then I started to pay more attention one day and noticed that the stuff in the front is intentionally pushed out to the front of the shelves with newer stock behind it, in many cases. I should have know this anyways, since I worked at a grocery store in high school and was taught to stock shelves just like that. But I just didn’t really care as a consumer and never really gave it much thought beyond that.
Eventually I hit a point in my life where I wanted to get the freshest stuff possible when at the store. Then I started to care about this.
I now routinely check behind the front item on the shelf and try to find the product in the back with the newer expiration dates. I find newer stuff all the time in back of the rows in the the produce and dairy sections especially. If you haven’t gotten into the habit of doing this, it can come in handy and buy you some more time to eat your vegetable supply before it goes bad, as an example.