I'm hearing two common yet contradictory themes here. One is that it requires the interviewee to think of an answer on the spot. The other is that the interviewer should already know the answer, from reading your background material.
But there's always more material that I can learn ahead of time about your company than you can learn about me as an individual. If the interviewer should know the answer already, then the interviewee should know an answer, too.
I will admit that it's probably not a good question for medium/large companies, where there's a specific role to fill, but for small companies I kind of like it. There's 10 different things we need to hire for, and you've got 100 different skills, so which ones do you have that align with our needs, and which ones do you want to apply here? You can't fit everything on a resume.
I confess I've asked this once myself, at the very start of an interview. I was exhausted from interviewing 10 other candidates, and this guy's resume wasn't very impressive, and I just wanted the guy to say something that would make me feel it wasn't going to be a waste of time. (Unfortunately, he was very junior, like "just learned to code last month", and his answer only reinforced that. I'd have loved to have hired him, but we really weren't in a position to hire junior developers yet.) It wasn't my best interview question, but it definitely wasn't my worst, either.
The trouble with simply shooting this down as a bad interview question is that nobody has ever been able to tell me what a universally good interview question is. This one is open-ended and gets them talking, at least.
I agree that the interviewee should know a answer. I don't like the spite/table flip answers suggested elsewhere for sure - I expect a prospective employee to be cooperative and marginally helpful no matter what.
However, speaking as somebody that has been asked this question, and someone who has considered asking it, a part of what a good answer to it means involves knowing about what the other applicants are like - compare and contrast is the real substantive bit of the answer here. It might be possible to avoid that implication by phrasing the question differently, but I can't think of a way off the top of my head.
The backgrounds and capabilities of the other candidates applying isn't likely to be something a prospective employee has the ability to find out about.
Just having some basic research done about all the problems the prospective employee might be asked to solve on the job is a reasonable ask of a candidate. As a candidate I demonstrate that by reading as much about the company online as I can an incorporating that into other answers. As long as the interviewer understands the limitation around knowing what the competition pool is like and interprets the answer to this question in that context I'm sympathetic.
Again, it depends on the company's size and hiring stage, but I've never been at a company where we've wanted to hire exactly one applicant from a pool. Whenever I've done interviews, we've been perfectly willing to hire zero (if none meet our standards), or 3 (if we find that many who are great).
So I've never cared about how one candidate compares to another. It's not a zero-sum game. If you're going to have a positive impact on the company (and its bottom line), then I want 3 of you. If you're going to have a negative impact, then I want 0 of you.
Obviously, there are also many situation where the opposite is true, e.g., if you're building a baseball team you want the best roster even if some of the positions aren't ideal.
But there's always more material that I can learn ahead of time about your company than you can learn about me as an individual. If the interviewer should know the answer already, then the interviewee should know an answer, too.
I will admit that it's probably not a good question for medium/large companies, where there's a specific role to fill, but for small companies I kind of like it. There's 10 different things we need to hire for, and you've got 100 different skills, so which ones do you have that align with our needs, and which ones do you want to apply here? You can't fit everything on a resume.
I confess I've asked this once myself, at the very start of an interview. I was exhausted from interviewing 10 other candidates, and this guy's resume wasn't very impressive, and I just wanted the guy to say something that would make me feel it wasn't going to be a waste of time. (Unfortunately, he was very junior, like "just learned to code last month", and his answer only reinforced that. I'd have loved to have hired him, but we really weren't in a position to hire junior developers yet.) It wasn't my best interview question, but it definitely wasn't my worst, either.
The trouble with simply shooting this down as a bad interview question is that nobody has ever been able to tell me what a universally good interview question is. This one is open-ended and gets them talking, at least.