The fact that something needs to be done doesn't mean that those who do it can not be sociopaths.
Surgeons are apparently more likely to be sociopaths than other professions, as a lack of fear is a good thing in that job.
I imagine that constantly doing something one knows to be wrong on a deeply personal moral level, even if it is necessary for our justice system, would have a devastating effect on the average person.
Surgeons only have to cope with the risk that someone dies under their care, despite them having tried their best to avoid it.
Lawyers have to cope with the risk that a rapist walks free because they did their job.