that is a very weird way of looking at it. "thank you" has always been a way of expressing gratitude.
yes, they may simply just be doing their job, but at the same time you are also doing what you as a customer should be doing: place your items on the counter, pay, get your stuff, and leave. there's no need for you to thank someone; there's no need for any words of exchange.
"thank you" may be a standard polite phrase, but so is "you're welcome" or "no problem". you were polite to them, so let them be polite to you by acknowledging your expression of gratitude.