Basically every answer I've ever read that involves a "real-world" situation begins with "If you got into a fight, your training already failed you". I know - I gave a couple of those answers.
So, I'm in a fight. What have I failed to do?
Most likely, you haven't
Now, a lot of "you failed to do X!" discussions seem to assume that perfect situational awareness and response mechanisms are always feasible. That borders on magical/Utopian thinking--in the same class as "true black belts can block any punch!!" Haha--no. Only on television. It's unrealistic to assume that everyone can always be in only safe places, only associate with calm/respectful people, or at all times be observing and managing their situations with perfect aplomb.
But let's assume you've taken "reasonable precautions" about where you are and who you're with, that you have "good" (though not Sherlockian) situational awareness, and yet you still find yourself near to or in a fight. What did you not do? I'd wager:
You didn't back down.
People generally don't like to appear weak or submissive. That's what "losers" are, right? If someone "gets in your face" or claims this is their territory, you "stand your ground," right? Maybe even "take the fight to them." After all, you're a trained martial artist! You have every right to be here. Dammit, you're in The Right! They should back down. Next thing you know, you're in a fight. Getting hit. Or shot.
Because even though you were reasonably careful and aware initially--especially of your external surroundings--you weren't sufficiently aware of your own internal responses. Your anger. Your ego. Your territoriality.
A lot of martial arts schools teach "how to fight." How many teach "how to avoid a fight" or how to calm down a situation"? Not so many. In theory, many teach a little Zen-y mumbo jumbo, or do a little meditation. Not many do much work on that moment of escalation, where everyone's emotions and territoriality are flaring. Not many teach you how to not fight, how to back down, to submit gracefully. That's probably why you're in that fight!
To be a little bit Zen:
You've failed to end the fight.
There could be nothing that you've failed to do. People are like animals, one day you can end up in a fight that you had nothing to do with. To absolutely remove all chances of having a fight you would have to live your life in a vastly different way, eschewing human contact altogether, and you would probably still end up fighting - fighting the wild squirrels/monkeys/whatever to get your food.
That sort of answer is usually proffered by pontificating fools (they do exist, even in MA circles). Theory around de-escalating fights, managing crowds, soothing people's feelings, etc. is add-on humanity type stuff that some instructors teach and isn't strictly included in any martial art. Nor should it have to be - you can go to other classes to learn that stuff. Techniques that work for one person in one situation may fail miserably when used by someone else some other time. The quoted statement makes the very large assumption that you could have or should have walked away. Situational awareness (which is something that is learnt from martial arts) and experience will sometimes say that you should stay and fight (even if momentarily).
I think it really just comes down to one thing. If you made a mistake, the mistake is that you were looking for a fight. It's an understandable tendency among martial artists, especially those that train for the "mean streets," after all; what's the point of training to fight and defend yourself in the mean streets if you don't ever actually use your training?
If we're talking about a fight that happened, only someone who was there can for sure know whether the fight was actually avoidable. Usually, however, we're talking about a hypothetical, and in this hypothetical, martial artists want to "test" their fight theory. If you think about hypothetical situations like that, that could create a tendency to actually go for the fight when there was an option available to avoid it. So constantly reminding ourselves (I really think it's more for personal benefit than for anyone else's) that you always want to avoid the fight will create that tendency when a potential fight situation comes up.
So assuming you weren't looking for a fight, and it happened anyway, any mistakes are of the "hindsight is 20/20" variety. There probably was something you could have done, like not be where the fight happened, even if that meant skipping your friend's birthday party, but then why would you think about the potential of a fight breaking out unless you were looking for a fight?
There's obviously a bunch of common fight avoidance strategies:
But really those are only guidelines that will help you avoid most, but not all fights. What if there's only a sidewalk on one side of the street and there's heavy traffic? What if you just want to enjoy one of the few sunny days outside? What if your job ends late and walking alone is your only option? What if you have to take any job you can get, or else be on the street ('cause that'll definitely increase your chance of getting in a fight)? There's tons of what-ifs, and they're perfectly legitimate as long as you're not looking for a fight. If you were looking for a fight, it's just an excuse to be in a situation where you can test your skills.
If you are someone who's itching for a fight, take up a competitive, full-contact, full-resistance style. Either train MMA, or one or more common MMA feeder styles. You'll get your desire to fight worked out in competition, so when it comes to "real life" you're satisfied. If you're generally conflict-averse, remain conflict-averse and you'll be fine.
Another way you can look at it is like this. If you had no training of any kind, what would you have done to avoid the fight? Did you do it? If yes, there's nothing else you could have done. If no, that was your mistake.