When your car is not running very well, does odd things and all types of random DTC error codes come and go one of the first things to check is the PCM
In this case a 2002 Z06, I suspect the car was in a flood and past owner or dealer shipped the car out of state so buyers beware.
Notice the difference in the 2 PCMs and that signs of the bad PCM was not just from driving through standing water but was under water for some length of time.
I then asked owner to check the passenger floor where the BCM and fuse panel is.
When fuses were taken out the tips were all corroded