White people get asked in China ‘are you American?’ That’s FAR more offensive than someone asking you ‘where are you from,’ because it actually presumes the answer.
A Polish friend of mine was appalled to be asked ‘Are you Russian?’ when she visited China.
(Think about it!)
By the same token, asking an Indian person ‘are you from Pakistan?’ is offensive.
Asking a Zimbabwean person ‘are from from Jamaica?’ is offensive.
Asking a Chinese person ‘are you Japanese?’ is offensive.
But there is all the difference in the world between making an assumption about where people are from, versus asking where they are from.
And if people don’t ask, even if it is sometimes uncomfortable, then they may end up doing something far worse, and making assumptions.
This is largely a question of being objective and dispassionate; reasoning with the head, and not the heart alone.