This is based on the idiom 'set a thief to catch a thief' - meaning someone who knows criminal methods can best catch another criminal. The logic is that a thief understands how other thieves think. Using similar expertise to solve a problem is the underlying principle.