To further add onto that, the PCM will run random tests of "readiness" on all of the emissions control functions.
Say, on early LS1's, had an EGR system and many liked to remove it. That is a whole different story, but I digress. The PCM would run a test to see of the EGR system was ready and operational. Obviously with it not being there, it could do neither, which then set an EGR code.
That is where programs such as LS1Edit come into play because you can change the type of DTC from a critical (type A) to a non-critical (type D or other).
Most states OBDII scan test check this function and also that all parameters are ready and operational.