I'm glad both cops are OK. A situation like this is very rare for most cops and often not one that they would have trained for or practiced on a lot. Like other people have said, firearms training is only one of the areas where cops have to maintain proficiency in an annual or biannual training cycle. A lot of the training is mandated by state laws which dictates specific training and further depletes any training budget.

A Patrol Rifle (usually an AR-15) from a lot further back would have been a safer approach for both cops. Since many departments don't deploy rifles, an officer is left with either a shotgun (not always deployed either) or his duty pistol. Range training with live ammo teaches you marksmanship, some elementary shooting while moving and minimal tactics. At the range, an officer can drive up to the same distance as this suspect and practice getting out of his patrol car and shooting at the target (simulated bad guy). Very few police ranges have targeting systems that can move sideways or even closer to the officer to simulate a suspect approaching them. So range training is primarily geared towards marksmanship, drawing, reloading, clearing malfunctions and other similar functions.

Tactical training with Simunitions or some similar system would have given these officers a chance to learn how to handle situations like this one while communicating to each other, taking lead and cover positions, forcing a suspect to react to one officer while the other has the drop on the suspect, etc. That does take time and money but officer proficiency in tactical situations like this goes way up. All officers in any given departments or even departments in a region are on the same page and know what each officer is supposed to do in a situation like this and learn how to communicate with each other and shift their tactics in response to suspect movements, etc. A lot (but not all) departments have this kind of training for active shooter (School shooter) training but it can be expanded for situations like this. It's impossible to devise enough scenarios to cover every single situation that has happened like this but after going through a dozen or 2 of these situations during training, your skill levels go way up and you are far better prepared to think, communicate with your partner and act in situations like this.