How to ask, if at all possible, what part of my CV interested the interviewer to interview me?
I found that in my professional life being honest, clear, and direct have served me very well. So once all the probing is over, I would say:

I have an additional question: Even though I am very interested in this position, I was doubtful I would be invited for an interview since my background doesn't seem to match perfectly. Would you mind telling me why you think I would make a good candidate for this position?

Of course adjust the wording to your style and take the details with a grain of salt as I am a non-native English speaker.