Think of organizations as a kind of AI. A prosecutorial organization can take on a so-called "paperclip maximizing" dysfunction just like a standard AI. Converts the whole world to paperclips.
The solution actually is to gate the specialist AI's through a generalist process. That's what court is supposed to be, but court is less effective in the modern world.