One situation where keeping the code may be desirable is when you may want to repeatedly switch between two versions of code for various reasons. For example, there may be a version of a routine which is too slow for production use, but is known to be very robust, and a version which is much faster but relies upon certain things working correctly. If things start acting strangely, it may be useful to temporarily switch to the slow-and-solid version and see how that works.
In a typical PC environment, one can probably handle such a distinction at run-time, though one might leave the slow-and-solid version out of non-debug builds. In embedded systems work (which is much of what I do), it's often better (or even necessary) to make such distinctions at compile time. Note that I would use #if/#else to enable/disable code in such cases rather than selectively commenting it out. Commenting out blocks of code of non-trivial length is ugly.
A second factor, related to the above, is that an unacceptably slow way of doing things may be easier to understand than a faster way. So it may be helpful to have a comment in the faster (production) version of the code which says "Should be equivalent to the above (slower) method". The slower version of the code may be obsolete, but may nonetheless aid in understanding the faster version.
A third scenario where I uncomment rather than delete things is when controlling build-time options. For example, in one of my projects I have a file called aadebug.h which contains stuff like the following:
// #define MASTER_DEBUG
#if MASTER_DEBUG
// #define QQ_RAPID_KEY_TIMEOUT
// #define QQ_FORCE_BAD_READINGS
// #define QQ_DROP_SOME_READINGS
// #define QQ_SKIP_PASSWORD
#define QQ_ENABLE_MOTOR_TEST_MENU
#endif
Various bits of code to test various things will be selectively enabled with #ifdef's; all such bits of code are controlled in file aadebug.h. The main screen display code includes
#ifdef MASTER_DEBUG
pcshow(VR5,5,64,"NOT FOR PRODUCTION");
#endif
so that any debug versions of code can be readily recognized as such. If after testing out a piece of code I decide the stuff to simulate errors (or whatever) is no longer needed, I'll delete the #ifdef's from the code and then delete the #define in aadebug.h; as long as the #ifdef's remain in the code, however, I'll leave the #define in aadebug.h (but commented out) as a reminder to the test code elsewhere.