Executive - those that enforce laws - salary about $35k to $60k (20 year vet).
Legislative - those that pass laws - salary $170k to $223k
Judicial - those that evaluate and judge laws for constitutionality - salary about $125k, median about $93k
The pay scale is not even close.
Cops have higher risk, need to be compensated to prevent the temptation of bribery, and more highly educated (knowing the law on the fly). Lawyers and judges have lower risk by far, and can research the law and have help. They are compensated perhaps because of tradition and that it's harder to get a law degree and be appointed to the bench.
I'm not exactly saying we don't pay enough, but clearly some find that it's low enough that they try to find ways to supplement (i.e. bribes and other misuses of the system), so it's pretty clear there's a problem which adds to the cops frustration.
If we really need cops to keep civilization from collapsing and becoming anarchy, we should be prepared to compensate them more equitably.