What you say is logical, but doesn't quite square with the macho attitude described in the other comment. If you're tired and you realize you're going to do stupid stuff - that you're past your limit, you've learned that lesson, it sounds like.
Providing a safe environment in which to learn how to recognize that you aren't performing at your best is wonderful; it's hard to simulate the other conditions that give suboptimal results, but lack of sleep gives a good cross-section of drowsy, distracted, over-caffeinated, agitated, etc.