Ok
Here is the input to the comparator (See PIC).
Basically the resistance on the lower leg on the user side must match the resistance on the other leg internally.
If it does, then both the legs will be at the same voltage (potential divider).
The comparator sees that they are the same (somebody else will have to help with that part of it, I am not too clued up on it).
If the voltages on those 2 legs are the same (because of the same resistances) the comparator will give an output.
If the voltages are different (if they short out the wrong pins, then the resistance for the lower leg on the user side will be less, and that means that the voltage going into Input B on the comparator will be less than the 'control' voltage set on the right (input B).
Either situation will cause the comparator to switch off its output.
Only by matching the user settable resistances with the built in resistance, will they be able to activate the system.
(Then they get clever, and can also measure the pins with a dmm to figure out which is the power (through R1) and ground. Then they put a POT across those two pins, and just turn the pot until the comparator sees a balance, and then activates). But they will probably have to know how you are doing it to be able to figure out how to do that...
Alarm systems do something similar by having a certain value resistor (I think 33r or 330r) in the last sensor on the line. If somebody cuts the line, the high resistance unbalances the comparator, and the system indicates that there is a Fault or a violated sensor (and sets off the alarm if armed). If somebody shorts out the line, then it lowers the resistance, and it falls out of the comparators window, then the system indicates that there is a definate fault, and then reports a tamper, and also sets off the alarm (if aremed)
P