Not murdering a prisoner doesnt require much judgment. Its drilled into every American service members head repeatedly. Those that do it think it will never be discovered, but there is always someone with integrity who steps forward and reports the crime.
These criminals like Gallagher are always turned in by their shipmates or fellow soldiers.