Saying hi to a clerk means being in a public situation where you may not be talking to people, but you're definitely receiving lots of inputs about their behaviors and feelings (unless you are incapable of reading this).
I think being in a place with other people, such as a shop, is of greater significance that merely saying "hi" to a clerk.