What the hell business of mine would it be to ask a question as nosy as that?
And it's usually not innocent small talk. For a lot of status-conscious people, the purpose of asking the question (and other similar ones) is to suss out exactly where that other person is on the social status totem pole, so you know how far "beneath you" you can treat them.
Ultimately it's up to you what you do with that information.