Again, the waste is not pointless, it's part of an inventory management strategy to ensure adequate supply. If your local grocery store established a policy that they'll never buy more meat than they're sure they can sell before the expiration date, they'd routinely run out.
The result of laws like this is not that the store will never buy too much, it’s that when they do buy too much they will give it away to somewhere it can be used instead of destroying it. It will not cost them much if any more to simply give things to food banks or charity shops.