From Li Ruzhen's Qing-era novel 《镜花缘》 (Flowers in the Mirror), chapter 14: 'Whenever they eat, they never do it openly - always 贼头贼脑, sneaking and hiding, eating with their backs to others.'
memory
Doubled structure 贼...贼... intensifies the trait. Same pattern in 鬼头鬼脑 (sneaky like a ghost) and 笨头笨脑 (dumb-looking). 'Thief-head thief-brain' = thinking and looking like a crook.