Section 319 of the Code of Criminal Procedure (CrPC) is based upon the doctrine judex damnatur cum nocens absolvitur (judge is condemned when guilty is acquitted). The legislature in its wisdom brought in the present section to keep a check in those cases where the investigating agency for any reason does not array one of the real culprits as an accused.
The entire object, therefore, is to not allow the real perpetrator of an offence to get away unpunished.