Every day, workers at grocery stores and convenience stores in Montana carry out a sad ritual. They come in, check the “sell-by” dates on their milk and throw out any milk that’s past the date.

Montana throws more milk down the drain than other states because the sell-by date on the milk is required by state law to be just 12 days after pasteurization (the industry standard is 21 days). After these 12 days, Montana law requires that the milk be thrown away. It can’t be sold or donated. Thousands of gallons of milk are thrown away each week that many believe is perfectly fine to drink.

In theory, Montana’s strict date label law is about food safety and protecting the consumer. But it hasn’t been updated since the 80s, and some believe it’s more about protecting the interests of the dairy industry.

Date labels, of course, aren’t just on milk, they’re on a lot of products. Forty-one states require a date label on at least some food product but there are huge inconsistencies, not just in the wording, but in the meaning of these labels. Some states require them only on dairy, some on shellfish, some on any perishable foods.

It’s become complicated to decipher these dates or to know how to act on them, for large retailers and individual consumers alike. And despite what many people assume, they are not about food safety and were actually never meant to be.

It all began in the 1970s. Americans had moved further away from their food sources and were eating more packaged foods and getting more of their food in supermarkets. Consumers wanted a way to measure how fresh their food was. At the time, most manufacturers already put encrypted dates on their products to help retailers rotate stock and consumers craved access to this information.

In 1977, the New York State Consumer Protection Board published a booklet called Blind Dates: How to Break the Codes on the Foods You Buy. The booklet told consumers how to decipher the encrypted date codes on their favorite products. The board distributed more than 10,000 copies and posted the booklet in supermarkets.

Eventually, consumers started to demand that these dates be put clearly on packaging, and retailers and grocery stores responded. A few states began to regulate these date labels, but there was no federal-level regulation, even though there were a number of attempts. Still, consumers wanted freshness dates, so all kinds of different ones popped up (“use-by”, “sell-by”, “best-by”, “best if used by,” “expires on”). Some dates were stamped right on the product, some printed on the label. There was no consistency in how this information was displayed or the language that was used.

Some companies even tried to use “freshness dating” to sell their products, like in this Pepsi commercial:

Some date labels were meant for consumers, while others were just meant for retailers. And as is still true now, There were no clear definitions for any of the phrases and no consistency even within the same brand or product. Dates could differ from state-to-state, manufacturer-to-manufacturer, or store-to-store.

Over the years we’ve lost track of what these labels meant in the first place. We’ve come to associate the dates with safety, when in fact, they’ve always been about freshness. As much as we might want them to, the dates on our food are not going to tell us if we’ll get salmonella or e-coli.

Most date labels are arrived at by conducting taste tests. Does a product still taste good on day 4? Day 5?

And yet today, according to a report that Emily Broad-Leib co-authored, a majority of consumers believe that eating food past it’s sell-by or use-by date is a risk to their health. And as many as 90% of Americans throw out food based on date labels at least occasionally.

The average American wastes somewhere between 20-25% of the food they acquire. The EPA and USDA recently announced a goal to cut food waste in the U.S. in half by 2030, and having a better date labeling system is one way to get there.