FIL does this and it drives me up the wall.
If he encounters a person who is from a minority and English isn’t their first language, he’ll say hello and thank you in what he guesses is their mother tongue.
So if a person appears to be Chinese, he’ll say xie xie for example. He does it to be kind and welcoming, but it makes my toes curl. What if they’re Korean? Or German? It feels really patronising to me- fair enough if you know the person, but assuming that a stranger speaks a particular language because of their appearance is just so off.
We’re Irish and he’d be most put out if a stranger assumed he was English, so I don’t understand why he does it to other people!