I recently ran across a "mystery chip" on a board, a PIC 12F629 processor with one output line and no input lines.
Since I had access to the programming pins, I attempted to read out the code, only to find out that the "lock bits" were on.
Then I used an oscilloscope to see what that output was doing: it emitted a 50 usec pulse every few milliseconds, just to keep the rest of the system alive.
The entire program probably consisted of 5 lines of code but the programmer wanted to make sure that no one else could download it!