Two points:
First, the average cop is less familiar with his issued weapon than we are with our carry weapons because the average cop is not a gun nut. We CCW people tend, on the other hand, to be gun nuts, and know our weapons the way a guitar player knows his instrument, or the way a motocross racer knows his vehicle, and we tend to be more thoroughly familiar with the rules of safe handling.
Second, this problem seems to happen a lot with the Glocks. The fact that you have to pull the trigger as part of routine breakdown procedure is what's causing it. Normally, you'd first remove the mag, then work the slide, and then pull the trigger. If, however, in the confusion of the moment (such as being in the check in line at the airport and having to take out your firearm in that environment) you were to get the order of those steps wrong, e.g., work the slide, then remove the mag, then pull the trigger, it's gong to go bang. Not a design flaw, but it does tend to cause problems in situations like this, when the gun's operator is not thoroughly familiar with his weapon and the rules of safe gun handling.
Remember the cop who was giving a talk to kids about the dangers of firearms? He took his Glock out and did exactly what this guy did, but he shot himself in the leg in front of the high school class. It was on video and made it to all the gun related web sites.
Naturally, it is still the cop's fault. Part of the answer, however, might be to address the process for selecting cops. At a certain point in history, they started screening out those who are actually firearms enthusiasts in the selection process. They decided that folks with no interest in firearms would make better cops, and this is the result. Another way to address it would be to require more regular qualification with service weapons, such as monthly instead of yearly. This will force every cop to become thoroughly familiar with his weapon, whether or not he starts out particularly interested in firearms. Alternatively, they could switch to 1911s, which, by their design, are much harder to accidentally discharge, and do not encourage the development of mindlessly pulling the trigger as part of its routine maintenance procedure.