I think this is a very large topic to disscus it here. ) There are many articles in the Internet where you can read about it. In this particular case using "Откуда вы?" is more preferable, because when you use a pronoun as first word in a question then it sounds more defiant for us.
If this helps, "Whence?" is the exact semantic match in English, although the word is antiquated. English today uses the interrogative adverb "Where?" to cover location (where?), destination (whither?), and origin (whence?). These have indicative counterparts in there/here, thither (to that place)/hither (to this place), thence (from that place)/hence (from this place). Of course, these are not used in contemporary English, but I find them useful when thinking about languages that still have intact systems of motion adverbs.