Police aren’t legally accountable for their actions so long as they’re acting in the performance of their duties, and lots of departments knowingly have illegal policies on the books to maintain that immunity for their officers.
People try to sue over it, but the cases are thrown out by the local judge because there’s no standing to sue unless the illegal policy had impacted you, so a cop basically has to kill someone before the policies are modified in the smallest way possible, but the killer cop still gets off.
Additionally, police are allowed to lie in most of their interactions with the public. They have created a culture that encourages dishonesty, so perjury isn’t an ethical problem in their eyes.