A judge used to work as a barrister (and, if he's a 'recorder', may still do so).
Barristers who work in the criminal courts will come across many, many cases where police witnesses lie, suppress evidence or simply exaggerate. So judges most definitely DON'T automatically take the word of police witnesses as being the whole truth.
Despite the media's representations of our judges as being 'out of touch with the real world', they actually know a great deal about what really goes on in it!