It comes from an episode of "The Big Bang Theory." Here's a transcript found on the Internet:Big Bang 15.
I was befuddled by "with a thing for"; it looks like "have something" to me.
Thing is used synonymously with affinity. It only really is heard in the context have a thing for:
I have a thing for blonde women
She has a thing for crime dramas
We need someone with a thing for smart guys
All of these are meant to convey a seemingly inexplicable interest.