As mentioned elsewhere, this is to weed out the pretenders. If someone is so arrogant as to refuse to answer even basic questions, I don't want to work with them.
I've been interviewing a fair number of candidates. I usually start with "write a command line program to sum the command line arguments and print it out". If they don't remember how to call main() - not that uncommon - I change it to "write a function" where the arguments look like what main() would take.
Think of it as a tree - I ask a question, the answer defines which branch I'll follow next. I do NOT have an array of 20 trivial questions - if you can answer 1 or 2 of them, I'll move on to the next level so as not to waste my time, or the interviewee's. I would say that if you've proven yourself to be competent at a certain level,move on to the next level. If not, I'll ask a few more questions at the same level to see if I've just hit an odd hole in your knowledge, hoping to not discard an otherwise good candidate.
One guy I asked to answer the aforementioned question said "give me a day or two to research it and I'll be able to do it". This guy had a masters degree in EE and CS. THAT is why you get these silly questions.
I had an interview with Cricket Wireless a few years ago, and they asked me questions about the differences between SQL Server 2005 and 2008. I had said on my resume that I had experience with 2000 and 2005 but not 2008. I reiterated to them in the interview that I didn't know squat about 2008. The STILL kept asking me 2005-2008 difference and feature questions. I decided I didn't want to work with such boneheaded, narrow minded people. I think the feeling was mutual. I know a guy who had done some consulting work for them, he said that my boneheaded, narrow-minded view was pretty much on the mark.
We just hired a lady who hadn't programmed in years, couldn't correctly write much immediate code - but she was able to accurately describe what to do and how to do it, and demonstrated a strong understanding of the fundamentals, algorithms, data structures etc. We felt that we could afford to help knock off the rust. So far she's working out great.
We also hired an adjunct college prof. She is so arrogant that we get constant constant complaints about working with her. She knows her stuff technically, but no one can stand her. Interestingly, she interviewed great. You just never know.