I have complimented someone on their English when it’s obvious they’re an immigrant (e.g., a heavy accent) because I want to acknowledge their effort. English as a second language isn’t the easiest to pick up. I sometimes have had others tell me they are immigrants but they have no accent at all when speaking English. I marvel at that as well, as I can’t imagine moving to Mexico as a young tween (which is when I started learning Spanish) and speaking Spanish without an accent. It would take so much effort.
I hadn’t considered that my compliment might be off-putting. I guess I was assuming that others might think like me. I like being complimented when it’s sincere and something I’ve put effort into (e.g., you’re a pretty good basketball player). I bristle when I’m complimented on something that SHOULD come naturally but someone wrongly assumes I’ve had to put the effort in (e.g., you speak English so well — even though I was born here so the speaker is assuming I’m an immigrant based on my racial heritage). Complimenting my English feels the same to me as if someone complimented me on breathing air. I’m annoyed because you don’t expect me to know how to do it?
But now you point out that someone may still be unsettled by such a compliment, even if they did put in the effort to learn English (versus those of us born here who picked it up by osmosis). Food for thought.