Same in Germany. A Lidl supermarket employee explained in a TV interview it's a liability issue though. Somebody could hurt themselves entering a garbage box. Also supermarkets worry people throw in their own trash.
In the U.S. I frequently see dumpsters meant for store/office employee use locked, and the reason is always noted to prevent randoms from throwing their trash in there. They’re usually hauled away less frequently than residential trash cans and they don’t want it to fill up with bicycles, furniture, broken appliances, etc.