I think what most people are trying to say is learn from this! I understand that there is probably more to the story then you can say, so people are left to fill in the blanks with their imagination, but just think about crap like this. There are lots of crazy people in the world and in your case, you're lucky enough that he wasn’t crazy enough to shoot you.
Weather you were there to back him up, threaten, intimidate, confront, or just sit back and watch, why are you (or I guess your friend) approaching a guy in a parking lot at night after work? Especially if you suspect that it’s not on such good terms? Instead you tell your friend, “Hey call him up and meet him Saturday afternoon, I’ll go with you!” Sure the ending of that story isn’t as cool, but….
The other thing to learn is look at from the gunman’s view. Maybe he hit you friend for no reason (like you said) because he thought he was big shit and it was just him and your friend. Now he sees you and another guy jump out of 2 separate cars from the shadows (because according to you, he couldn’t even see you). He may not have known how many people you had and now he’s out numbered so he grabs a gun. What if he just started shooting in any direction? What if he hit someone else in the parking lot? What if he did pull the trigger?
I don’t know you, but I’m glad you’re okay. There are so many bad things in the world that can happen to anyone of us that we can’t control, there’s no reason to put yourself into bad situations if you can control it. It was a brave thing to due, but equally as stupid.