Jason Brimhall talks about trick questions at interviews:
Anybody that has interviewed for a job has most likely run into the trick question. Some interviewers like to throw out multiple trick questions all in an effort to trip up the candidate and get the candidate to doubt him/her self. Sure, there can be some benefit to throwing out a trick question or four. One such benefit would be to see how the candidate performs under pressure (see them squirm).
The downside to throwing out trick questions, in my opinion, would be that you can turn a serious candidate into an uninterested candidate. So, when throwing out the tricks, tread carefully.
Incidentally, I don’t think his example question was that tricky, in that there are good reasons to do what he shows. I have one question I like to ask during phone screens which is of a similar vein. I won’t share the question for obvious reasons, but answering it requires a reasonable amount of knowledge of the product and a little bit of cleverness.
On the whole, my interview philosophy is to ask questions which directly relate to the job at hand. If the job involves doing a lot of work with warehousing and ETL with SSIS, ask questions around columnstore indexes, tuning SSIS packages, and some of the types of red flags when looking at packages. I’ve found that people who really don’t know what they’re doing sort themselves out easily enough if you ask relevant questions.