People ask that question because they have a mental image (a stereotype) of people based on
1. There place of origin (country, state, or region)
2. Their ethnicity.
There is even a difference in the minds of some people between persons of American slave ancestry, West Indies Ancestry, and African ancestry whose ancestors were legal migrants and not slaves.
Some migrants carried forward cultural traditions and even attitudes, handed down over the ages, especially amongst those that live(d) in rather homogeneous communities (Irish, Germans, Swedes, Germans, Quakers, Mennonites, for example). You can find that today in some states or parts of states like Minnesota, New York, Pennsylvania.
Anyway people want to know where you are from, so they can pigeon hole you, and pull up their stereotype of expectations. There seems to be a strong need for certainty and discomfort with uncertainty amongst many in our species