The immunity under Sections 77 and 78 IPC is a public policy defence, not based on the actor's lack of culpability but on countervailing public policy interests.
A.P. Civil Liberties Committee (APCLC) and Others v. Government of A.P. and Others2009 Cassie (AP HC) 395para 123