There have been several recent discussions concerning concerning the best way for interviewees to deal with interviewers who ask so-called "illegal" questions. (Although my understanding is that Glaucon, writing here, is basically correct: though it is illegal for search committees to use the information as a basis for hiring decisions, it is not literally illegal for them to ask the questions. But whatever. I'm not a lawyer, and its not as though there's no relationship between the information the search committee attempts to collect in the interviews and the information the search committee might use as the basis for its decision.) A discussion at Feminist Philosophers is here; a discussion at NewAPPS is here.
As I read through the suggestions, I find myself thinking the same thing over and over and over: this won't work. It seems to me that all such suggestions are basically misguided, in that they are based on the premise that there is some reliable way to diffuse the situation without harming your chances of getting the job. I don't think there is any reliable strategy here.
As I see it, there are four main ways of responding to the situation:
1. Answer the question honestly. There's always the chance that they just want to let you know how great their department/school/community is for people in your situation, or how open and welcoming they are, and that they won't use the information in their deliberations, after all. Maybe. Probably, even. But I guess I wouldn't count on it.
2. Answer the question dishonestly. After all, at this point in the process, it really isn't any of their business. Of course, it'll be somewhere in the range between difficult and impossible to maintain the lie if you get the job, and it'll be awkward when the truth comes out. AWK. WARD.
3. Decline to answer the question in a way that draws attention to its inappropriateness. You can do this in a way that conveys some negative emotion, such as anger, frustration, disappointment, or sadness, but doing so is not going to be good for your chances however you do it. Letting your interviewers know you're not happy with them isn't a good interview strategy.
You could try to do it in jokey, laughy way, but any way you frame the joke, it's a joke about how the interviewer has asked you a question you find inappropriate and/or legally problematic. It won't work if joke is at the interviewer's expense; you have to bring him into the joke with you, but in a way that still makes it clear that the question was not appropriate and you're declining to answer it. I'm not saying it's impossible, but it's going to be hard. This is not a beginner-level joke.
4. Decline to answer using stealth, without drawing attention to the inappropriateness of the question. Maybe by changing the subject or something, or by telling an unrelated joke. There's a lot of potential for weirdness here. They asked you a question; you didn't answer it. It's not like they're not going to notice.
If I had to pick, I'd say #1 and #4 are the best of a bad bunch. This has happened to me only a couple of times, and both times it was fairly clear that they were just trying to let me know that their area had a lot to offer. At least, that's how I read the situation at the time. I adopted strategy #1, and answered honestly while trying to thread the needle between seeming open and forthcoming while revealing as little as possible and trying to move on quickly. The alternatives seemed much riskier. But I felt really awkward, and the awkwardness was not alleviated when, on one occasion, one of the other interviewers pointed out that the question was out-of-bounds. I wasn't at all confident that I was handling it right. And it goes without saying that I didn't get the job (not that I have any reason to suspect that there's any direct connection).
And so it seems to me that once a question like this comes up, there are no good alternatives. There's no reliable way to maneuver oneself out of the situation. It's possible to pull off, of course. There are things that will work here and there. But I can't see any general piece of advice that would be widely applicable and effective in a risk-free way. Which bums me out.