They can't outright ask you if you're Mormon, so they ask what ward you're from since that's technically asking you a question about geography.  Your answer and where you take the conversation next reveals all they need to know about your religious status, which is what they really care about.  This is such common knowledge in Utah that I'm surprised nobody has mentioned this already.