Water usage is probably my biggest. Living in a high desert, my wife and MIL see no problem with filling one side of the sink with hot soapy water to wash a few dishes because “that’s just how I’ve always done it”, to watering the grass and plants for hours. All of this makes me mental.


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.
You expressed gratitude. You may not have meant it, but you’ve expressed it nonetheless. It doesn’t matter if the opposite party deserved it or not; “thank you” is an expression of gratitude, and the only polite ways they have of answering that is “you’re welcome” or “no problem”.