Surely handling all the goods you have to scan is just as dirty?
Money is far dirtier than any item on the shelf in a supermarket.
People pick up items from a shelf and bring it to the checkout - of course the delivery process isn't a sterile environment but items are rarely visibly dirty.
I have had people attempt to hand me money that is covered in saliva, sweat, blood and a variety of otherwise unidentifiable wetness and/or stickiness and potential bodily fluids.
I have had people try and give me money produced from various parts of their person - including bras, underwear and socks.
I have had people try to hand me money that they have produced with dirty hands from the depths of the pocket of a coat that stinks of piss and has not been washed in the last decade.
I have had people hand me money with hands covered in dirt, oil, nicotine, plaster dust, paint, cement mix etc
I have had people hand me money that is visibly dirty, to the point where its only because the number was just about visible that I could differentiate between the 2p and the 10p they handed me.
I have had people dump out the contents of their pockets- coins, fluff, old sweets, scratchcard dust, random cigarette filters, bits of god only knows what and all - onto my desk and expect me to root through it to get the money they owe.
All of these things are stuff retail workers encounter every day. I'd rather empty a whole pallet of stock onto the shop floor than take money from some customers.