Of course it's not just a minor inconvenience if it happens when you're blowing through that red light you didn't notice, or remembering you were supposed to turn the cooling tower on as your town's emergency alert sirens start going off.
So What's to Blame?
This has long considered just one of those mysteries of the brain, but researchers have recently done studies that found that your brain basically has a built-in sleep mode, like your PC. The "brain farts" weren't sudden, random glitches, but planned shut-downs. Up to 30 seconds before a mental fart occurred, researchers could see the relaxation centers of the brain lighting up and other sections going dark.
This "sleep mode" exists in your brain for the same reason it does on your PC: to conserve energy. The studies found brain farts usually happen when you're in the process of doing an activity that you've done a million times, like a routine task at work or skinning a jackrabbit. The thinking part of your brain figures it doesn't need to be around for that boring shit, and nods off.
The problem, of course, is that a whole lot of those repetitive tasks are also the most important things we do in the course of a day. Some of us have jobs where failing to do them right even once results in everything catching on fire.
"Dammit, brain! Not again!"