The problem with these situations is, as has been stated, we never get to see what lead up to the incident.
Sudden movements, hands not in sight, reaching for a phone, wallet, or registration .... if the officer has his hand on his weapon, it's best to ask if it's okay to reach for whatever. If the Cop is nervous, he'll give instructions on what to do when. He may have you exit the vehicle and relieve you of the weapon to keep your hands away from it.
Just because there is a woman with a child in the car in no way guarantees the male won't pull a gun to get away. For all the Cop knows, he could have carjacked the woman and child and has no problem putting them in more danger.
I can't give an opinion about what went wrong, since we are only getting the second half of one side of the story. What I mentioned above is meant to be "in general", not speculating on this case.