i know that a lot of factory stereos have a code required once they are removed.
basically i think it works like a clock, you take away the constant power source and it resets it. once power is given to it again it needs a code to allow it to be used.
very simple concept.