The food dating system in the U.S. is a confusing muddle. So much so that it's estimated that approximately 25% of perfectly good food gets discarded due to the confusion and/or lack of understanding the various dates, of which there are 3 primary ones.
The "Sell By" date is primarily used for inventory control and for stocking purposes, so that a retailer knows when to replace products with those that will have a continuing and longer shelf life in the buyers home. Basically, it's a date than be ignored as it has nothing to do with food safety.
The "Best By" Date is the date recommended by the manufacturer for best flavor and quality. It is also not a safety date.
The "Use By" date is the last date determined and recommended by the manufacturer for the use of the product while at peak quality. As with the other two, this date also has nothing to do with food safety.
Aside from infant formula, the USDA and the FDA have no published guidelines or regulations pertaining to the dates you see on any food products. Some States have guidelines, and possibly regulations, but many don't. For the most part, the product dating system is a cooperative venture between the manufacturers and the retailers.
Also, most manufacturers don’t even use scientific lab testing techniques to make the determination of the dates. They simply rely on consumer taste test panels and/or what their competitors are using.