Name the key participants in both criminal and civil courtroom

Defendant, prosecuter, judge

How would you summarize the historical role of law enforcement in society?