When you buy produce at the supermarket in bags, they can't sell you less than what you pay for, so you usually end up getting more.  For example if you are buying a 2kg bag of onions and 12 onions weigh 1.95kg they will have to put an extra on in.  So if the price per kg is the same, then bags can often be the better way to go.

Buying bagged produce is sometime cheaper, effectively a bulk discount, but often the per kg price is the same.  However out of interest I put a 2kg bag of onions on the scale the other day and discovered is weighed almost 2.2kg.  Given these onions were quite large and probably around 200g each they must have overfilled the bags sometimes to make sure they don't rip you off.

It might sound like a small thing but each bag I checked was over, either by a little or sometimes up to 20%.  This difference would really add up in your favor over the long term.

So if you find this is a habit your local store is into, why not take advantage of their generosity.