What is justice?
The police officer in the film is always right, always honourable. He knows that the villain is guilty, and there’s no other way to get him. Bollywood is so much simpler than reality.
In the real world, the police are fallible human beings. We have established a complex legal system to ensure that anyone suspected of a crime gets a fair trial. The accused can defend himself; the prosecution argues against him. An impartial judge, hopefully with many years of experience, presides over the case, and a jury ensures that the final decision does not rest with just one person.
The system is imperfect. It is sometimes slow, and not always as neutral and objective as it should be. Occasionally there are mistakes, when the innocent are condemned and the guilty go free.
Even so, it is by far the best system that humanity has come up with to date. A fair trial and the rule of law is designed to protect society as a whole. You cannot simply be accused of a crime and arbitrarily condemned without the chance to prove your innocence. Yet this is what the police are doing when they kill a suspect before trial.
In some cases, it may be self-defence. It may come from a sense of anger and self-righteousness. It may be revenge. It may be the rush of power. But it is not justice.