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.