Definitely chicken and egg.
I've no doubt that a minority of customers are awful, but that really doesn't excuse the worker from treating all customers badly. They need to learn the difference.
There is NO excuse for any worker to do the "huffing and puffing", "eye rolling", no please and thank you's, etc., for a customer who is perfectly polite to them (most customers will be!).
I think there can be a "culture" problem in some places where the staff (and management) act collectively, either good or bad. Our nearest big Tesco is lovely - most staff really good, we're even on friendly terms with some of them who we see regularly - especially a couple of them who bring the click and collect shopping to the car pick up area - they seem to have been there forever and always pleasant, friendly, chatty, etc. But if we go to the further away Tesco (similar size), most of the staff are grumpy and miserable and unhelpful. Same firm, being paid the same, but VERY different culture of customer service.
Same with areas. In our nearest city, most of the city centre retail staff are pretty unhelpful and miserable. Yet, we also regularly go to York for short breaks, and the staff in the same chains of town centre retail stores are completely different, much more helpful, friendly, etc. - again, same employers, paid same wages, etc.
I do think that if you're working in a place where other staff are miserable and unhelpful (and management too), then that rubs off onto you too. Likewise if your co-workers are helpful and friendly, you're more likely to follow their lead.
In my experience, it's pretty rare to go into a store and get good customer service from one member of staff, but crap service from another. I do think that how they treat customers rubs off on the other workers around them, whether good or bad and soon, most of the workers start to treat them the same way.
But mostly, as I say, chicken and egg. When a retail worker is unhelpful, argumentative, eye-rolling, sighing, or just no common courtesy, then I'm more like to respond in kind back to them. But I always start off by being polite - if they wind me up, then they get it back, like for like, not abusive or aggressive as that's not me, but certainly I am not afraid to be assertive when the situation demands it.