They’re allowed to lie to suspects to get a confession; some of them carry that forward.
Worked as a investigator for a City, saw actual lying by the police to make a charge. ON the flip side, when an officer was involved in an accident, etc, invariably the officer lied.
A police officer is no more trustworthy than any other person, and is heavily influenced by the environment. If an environment accept and encourages falsifying misconduct, the officer will be hard pressed not to conform, and the history of the NYPD is such that irregular activities are not atypical.