^
This.
Kung Fu Wang,
It is poor logic, fallacious, really, to conflate different types of failure. When it is said that "failure is a great teacher," it is meant, among other things, that there are more lessons to be learned from failure than success, particularly in a training or teaching environment. As was also mentioned, psychologically, there are specific responses from failure that don't occur from success, that allow for better learning.
By contrast, the examples you give, of educational testing and the like, are not in the same category. By the point you are sitting for SATs, LSATs, GREs, or whatever, your actual learning should be behind you. Failing at this stage isn't going to open your brain to new information. This is particularly true given the fact that you will likely learn of the failure weeks down the road.
When you speak of being stabbed as a failure, again, we're talking a different animal. Even if a martial artist performs a knife defense technique flawlessly, it is possible to be injured or killed by a person with a weapon. There are a couple of old clichés that I learned in the military. One, "I'd rather be lucky than good," is sort of a dark way of recognizing that even the best occasionally come up short. The converse, if you will, that "the more we sweat in training, the less we bleed in combat," recognizes that the best way to set yourself up for success is to not rely on luck, but to optimize your skills. This is done by training, and AARs (After Action Reviews). In AARs, in training and after actual missions, both successes and failures are looked at, so that we can build upon success, and learn from failure and try to correct it, hopefully before casualties are taken. But even then, there is that recognition that occasionally, "luck" does run out.
Again though, your examples are far afield from what gpseymour and others were talking about.