In the military, the Inspector Generals are strongly educated in the privileges of Command, and will not cross that.
They are meticulous about following the letter and spirit of the law and regulations, and do not counter a commander without plenty of due process and thorough, scrupulous investigation.
However, if a commander commits an illegal order, act or any other infraction, the IG MUST act on it, as there is an appeal process that will involve the chain of command upward.
There are a lot of barracks lawyers (people who think they know it all) who think the IG is there either to persecute the commanders, or do their bidding like toadies, but that is not the case.
Whether it is the military or civilian agencies, the IGs are comprised almost entirely of members of that agency or branch. I am not casting aspersions on IGs, just noting that they cannot investigate their own institutions with full objectivity. It is an inherent bias.
Every hing I know about Inspector Generals I learned from Danny Kay.