I had the same thought, too—but I wonder if it could affect their inventory-tracking and re-ordering system? Because it would tell the system that they’re selling more food than they actually are. It might seem like a negligible amount to the customer, but if lots of people do it, and over time, it might throw things off for the store. They could wind up ordering produce that would sit and rot (because they’ve ordered too much); sure, it’s already been paid for by the customers who brought their own “heavy” produce bags, but it would add costs for the store in terms of labor to handle the goods, plus costs of disposal, increased paperwork, etc., etc. Small costs add up quickly. And storage space for inventory, especially refrigerated, may be tight. I’m not a grocer, but I know the margin on groceries is very small and the business is very competitive. IIRC everything is tracked, even the waste and trimmings from produce get weighed and accounted for.
I think it’s also possible that the cashiers genuinely care that the customer is paying for more than they’re getting!
Maybe someone in the grocery business can weigh in here and fill out the picture for us.