Even still, let's imagine they're performing using a pseudo-random number generator, and let's imagine they're using a trained neural network at some part of the program. The training (genetic or back-propagation based) didn't account for a very specific scenario, and the tool mis-classifies it, telling the computer to do the wrong thing.
If you're suggesting that we know what a computer will do on every single given input, we don't. That's in a class of unsolvable problems, as it requires the halting problem to be solved.
[Added the following section after being down-voted]
A "shock", in the deterministic computer world, could be an incorrect classification resulting in an incorrect action. The results are similar to when a human is shocked and doesn't act correctly.
Is the scenario I've painted limited to neural nets? No, any trained classifier, even any program at all may have "minor" slips like this. (When dealing with an analogue world, there's a ridiculously large number of situations that may exist). But you know what? Humans don't perform perfectly; and a computer that's been shown to perform the correct final* response 100% of the experimental time, and 99.9997% of the real time is competent at the activity, and trustworthy.
Disclaimer: I love machine learning, I love neural networks, and I see great usefulness for them in this world; however, I also believe that the perfect combination of variables could yield unusual results. Is it unlikely? Incredibly. Possible? yes.
* Consider a situation where a child is playing with a ball. The computer may not recognize that anomaly on the side of the road as the child and the ball, or even as something to be avoided. If the computer recognizes the anomaly as something that needs more information; then tells the car to slow down until it can acquire that information, then recognizes it as something that needs to be avoided and does so, successfully, safely, and with sufficient space for the conceivable outcomes that may have resulted with this child; then, while the computer couldn't discern the object at first, it did in the end and adapted to the situation appropriately. The "final response" was correct.
[edit: rather than simply down-vote me, please tell me where I'm wrong so I can learn.]