Not to automatically defend the cops, but unless they know exactly what's going on or how someone violent may behave, anybody with a knife who doesn't stop their approach when told to drop that weapon will be shot by police.
They are trained to shoot at the centre of your body, not at your hand, your leg, arm or between the eyes like you see on television or in the movies.
They want to come home safe and sound to their families, and they're not going to take any chances.
But it does sound like a LOT of shots for a guy armed with a knife.