Because non-native speakers use English differently as compared to native speakers. It’s… it’s as simple as that.
I can also usually tell within the first few moments of talking to somebody on the internet whether they are from a native English-speaking country or not. They’ll use slightly different phrasing. Use of idioms is also a dead giveaway.
I dunno. It’s usually patently obvious. This doesn’t make a non-native English speaker’s English bad by any stretch; just different.
I can also generally tell where native English speakers are from as well, at least in a general sense. Canadians tend to sound like Americans (even in writing) but spell more like the Brits. British persons obviously use British English and will use British colloquiums and the word ‘whilst’ often will pop up. Australians lean heavy on the word ‘mate’ a lot of the time. Americans use American spellings and sound like Americans.
And so on.