Yes, I agree, I think it's often for humor: "I know it - [double take] - but I don't believe it!"
I was wondering, however, about cases of cognitive dissonance; take the classic case from When Prophecy Fails
WP, where X = "our cult leader's prophecy that the Earth would be destroyed while we were being carried off by a flying saucer wasn't fulfilled"; also cases of fideism
WP, such as Kierkegaard's [paraphrased] "I know God can't exist, but I don't believe God can't exist (moreover, I believe God does exist!)."
Not that cognitive dissonance doesn't involve surprise, one might even call it shock and trauma in the case of failed prophecy, but I think there's an emotional component to belief it reveals; fideism, the believer's belief in what he knows can't be true, would seem to depend on this as well.
I'd express its 'logic' as roughly: "I know X (as a justified belief-hypothetical), but (because I really really don't want to either know or believe x, due to some deep-seated emotional, existential commitment to not-x, let's invent another sort of belief, belief-existential say, and make it superior even to knowledge) but I don't believe X." So, seems another instance of ambiguity (as you & Squeegee discussed earlier), belief two-timing as 'hypothetical' and 'existential'.