There's an allowed margin of error, too. If they happen to have gram-level precision, but have 10g leeway for a given product, this might be a good way to save scrape out a bit more margin.
That would be easy to prevent though with an additional requirement: The average weight over N products must be within X% of the specified weight. This way the producer cannot intentionally underfill.
I was thinking that. Good solution. I'm not sure what would prevent them from lying though. The only way to know would be to unpack a whole batch of their products.
If they straight up lie, they're liable for a big fine (or maybe worse, if they're really shameless about it), and buying a few things to weigh isn't that impractical. IIRC a chip company in Canada got caught a bit ago skimping, starting with someone who weighed a bag at home.
Sure, and you could even have many maximum sample variances prescribed in law for different N. Hell, you could even specify it in the form of a mathematical relation, and say that the sample mean has to limit to the nominal amount regardless of sample pattern. At that point, manufacturers would be forced to be at least as fair as regulators could measure, without assuming anything about how accurate their bag filling machines are or aren't.
That's more complicated, though, and I'm guessing they wrote in what seemed reasonable and good enough at the time. Just tightening up the percentage inaccuracy allowed for manufacture at scale to reflect technology might be good enough again, whenever they revisit these laws.
That's literally what they do. If you increase the number of samples, that obviously increases costs correspondingly. If it's still a tiny sliver of everything produced it's practical, though.