

When you thank a cashier, that’s the standard polite way to close the interaction and both of you understand you’re not actually expressing gratitude to them for simply doing their job.
Responding with “you’re welcome” implies the settlement of a social debt (i.e., yes, I did you a favor and your gratitude is acknowledged) that wasn’t part of that purely transactional exchange. It’s an exaggerated response that comes across as presumptuous. You thanking the cashier doesn’t indebt them, but their “you’re welcome” implies that you owed them.
BUT that’s not their intent, they’re just mindlessly saying it because that’s how their manager or grandma or someone taught them to respond and they never stopped to think about it. So I find it mildly annoying, but I’d never point it out and neither of us wants that discussion.
But it’s not an expression of gratitude in this context unless they did something beyond their job duties. Thanking them is just the universal polite way of ending the exchange and most customers do it. This interaction is routine and necessary to complete a purchase, and customers aren’t expressing genuine gratitude just because the cashier did their job.