Why did you include pay in that list? Where is total compensation for cops less than the median private sector compensation, once all benefits are considered? Usually, it's much more. Even if it were only equal to private sector, so what? Many more candidates than positions for cop jobs, which means they should have no trouble finding quality candidates. If they can't, pay isn't the problem. Indeed, in the private sector an oversupply of candidates usually means pay goes down, not up.
OK, look at the three branches of gubmint.
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.