That's true of any witness, though. Perjury is a crime, but you have to prove it.
In the trial context, good defense attorneys will be able to introduce contradictory evidence, or will challenge the credibility of a witness by finding facts that make them look bad -- even police officers. With police officers it's a bit harder, though, because the public largely believes (wrongly, I'm afraid) that police are more trustworthy than the general public.
Lying in court is one thing, but it’s been accepted that the police can use deception to get information.
It makes sense. In many cases, subjects of investigations are unaware of them.
You may never have a situation where you wouldn’t want to share camera footage with authorities. But many people do, for a variety of reasons, and creating a norm where your home is a node of some surveillance network has obvious negative potentials.
The whole ecosystem of fear around home surveillance, Nextdoor, etc is awful and companies like Amazon are exploiting it without regard to the impact that it will
have.
This IMO needs to change, if they can legally lie to you they can lie in court. They do both.