Personally, salespeople have randomly complimented me and repeated my name over and over, and on the receiving end it weirded me out. So the problem is that in certain situations there is an overarching "what did you want to get out of that person?". Don't be those people.
Strike up conversations because you enjoy people and their stories.