All courts exist to do justice
All courts, whether civil or criminal possess, in the absence of any express provision, as inherent in their constitution, all such powers as are necessary to do the right and to undo a wrong in course of administration of justice on the principle “quando lex aliquid alicui concedit, concedere videtur et id sine quo res ipsae esse non potest” (when the law gives a person anything it gives him that without which it cannot exist).
While exercising powers under the section, the court does not function as a court of appeal or revision. Inherent jurisdiction under the section though wide has to be exercised sparingly, carefully and with caution and only when such exercise is justified by the tests specifically laid down in the section itself. It is to be exercised ex debito justitiae to do real and substantial justice for the administration of which alone courts exist. Authority of the court exists for advancement of justice and if any attempt is made to abuse that authority so as to produce injustice, the court has power to prevent abuse. It would be an abuse of process of the court to allow any action which would result in injustice and prevent promotion of justice. In exercise of the powers court would be justified to quash any proceeding if it finds that initiation/continuance of it amounts to abuse of the process of court or quashing of these proceedings would otherwise serve the ends of justice.