I worked in the food vending business for 14 years, so I know a bit about this subject. The date you saw on the yogurt cup was almost certainly not an expiration date. It was most likely a "best by" or "sell by" date. Food has only expired if it has reached the "use by" date or if it has gone too far passed the sell by date. The last differs depending upon the product. Yogurt would be good to consume up to 10 days after the sell by date.
"Best by" dates are not expiration dates—they merely mark the last day before food quality declines.
spoonuniversity.com
"While some areas of food labeling are
strictly regulated, food dating seems rather arbitrary. What is the real difference between "sell by", "best by" and "use by"? And what happens if you eat food after this date?
"Best by" indicates when a product will be of best flavor or quality.
"Sell by" is used by manufacturers to ensure proper turnover throughout the journey of the food product. This helps the food retain a long shelf life even after purchase.
"Use by" marks the last date recommended for the use of the product. This is often printed on meat, poultry or egg labels and should be taken seriously."
What I can gather from what I was told by the Board of Health inspectors on their yearly inspections of my locations, if a shelter or food pantry gives out product that has passed its best by date it is not doing anything wrong no matter how long after the date it might be, If it gives out sell by passed the date it is not doing wrong as long as the guidelines for each particular product are followed by which one can determine when the food is still good for use, .If it gives out product that has passed its use by date it is illegally endangering the health of those it is supposed to be helping . The food pantries and shelters that I donated snacks to would not take any product that had passed the best by date because either those in charge refused to believe that that date was meaningless in terms of health, or the more reasonable thought that it was unseemly to give people in need, something that a consumer would not be happy to buy at full price.