So, it's not ok to intentionally kill the suspect, but it can be ok to use deadly force. I'll assume you're really asking why deadly force might be acceptable. A pipe in the hand is a lethal weapon. If a police officer is duty-bound to apprehend a person who is using lethal force against him, it would be insane to use anything less than lethal force in response. If an officer attempts to use less effective non-lethal means, but fails and is killed, then he is not only dead, but also has failed in his duty to protect the public just as if he had run away.
It's important to remember that these situations can happen extremely fast, under enormous stress. A routine encounter can turn deadly serious in a fraction of a second. The whole thing can be over in under three seconds. There is no time to think or reason. To think is to hesitate, and to hesitate is to die. You must have a trained reflex: if they use deadly force, then I shoot at center-of-mass. Seeing a pipe in the hand of an approaching person might be the trigger for that reflex. It's not quite so simple, though. It's best to prime the reflex by thinking it through before-hand. Police officers must constantly maintain situational awareness, thinking through possible scenarios and priming their reflexes based on who is around and how they're acting. It's a very difficult and dangerous job.