Actually firing through the windshield is a legitimate technique and trained in some quarters.
Certainly it's sometimes necessary when firing into a vehicle, which cops sometimes do. After being somewhat deflected by the windshield the rounds are only a foot or two from the target.
Firing out of a vehicle through a windshield is a whole nother kettle of fish. The rounds have a much longer distance to the target after being deflected. Not only is it stupid and unsafe to use a firearm that way, the odds are high that it will also be quite futile, a waste of rounds. Geometry matters.