It’s called laying down suppressing fire to break contact.
Besides, being in a car, you really don’t have a wide range of motion to where you can take well aimed shots.
And in a situation like that, I wouldn’t want to hang my arm outside where it would be easier for the thugs to grab it.
It’s called “shoot through the glass”. A bullet WILL shatter a windshield, and any broken fragments will travel “out” away from the vehicle occupants (and “into” the aggressors). He then has a clear field of fire for aimed shots.