The shoppers in the store are like sheep to Sammy because they blindly go up and down the aisles and then head to the checkout counters just as sheep are blindly herded to slaughter through chutes. When Lengel embarrasses the three girls for dressing inappropriately in the store, the others all crowd together nervously like scared sheep. Only Sammy dares to defy the policy of the store and society and challenge the rules. He's the only one who is willing to say society's rules, written and unwritten, are not always fair. Even the three girls in bathing suits give in to society's mores as they leave the store humiliated by Lengel. Sammy quits because he sees Lengel and the shoppers as blindly following the protocol of society, and yet no one seems to feel that Lengel's embarrassment of the girls is wrong. Sammy challenges whether Lengel should have the right to treat others in this fashion.
Sammy thinks of customers as sheep because he really doesn't care about them as individuals. They are all the same to him...simply people that are there to buy goods. Also, let's think about how sheep are regarded and taken care of. They are not regarded as the smartest animals, first of all. Also, they are herded through gates by Australian cattle dogs or other types of herding dogs, just as the customers are herded through the check out lines at the A & P store where Sammy works. The reference of people as sheep is not a pleasant or flattering one, then, as we can see!
Sammy's calling the shoppers in the A&P sheep says more about him than it does about them. They aren't sheep--animals that crowd together for protection and direction. They're just shoppers. The issue is Sammy's twisted view of almost everyone in the store. He objectifies almost everyone in the store and in doing so lessens their humanity (and his own). Sammy is sick. Deeply so. His calling the woman at the "a witch" who "they would have burned at the stake over in Salem..." reveals just how twisted working in the A&P has made his soul. There's something so soul-sucking about working at the A&P for Sammy that unless he escapes (which he does), he could become a very dark and dangerous man.