Hmmm. I would say that to someone if I have never thought about the question someone asked, especially if I were shocked by it. It can also indicate in a way that you think the person posing the question is smart since they are very observant and have asked such an interesting question.