Hahahaha I showed Swifty this about a year ago. We both got amused by it too
But I think it's easy how it happens, it just asks you a lot of questions until there aren't many options then it makes the guess but you don't think about the fact that you just answered so many questions for him to guess.
But it is freaky though, and has even got some of my hardest to guess people.