As a cop, if you get caught lying, i.e. intentionally false testimony in court, your career is effectively over. Any defense attorney can bring that one time you got caught lying up in court, discounting your entire testimony on every case forever, making you useless. No matter how bad you screw up as a cop, the number 1 rule is don't lie about it in court.
*Maybe not in some jurisdictions? But realistically yeah, always