It’s not against the law anywhere to approach a cop and strike up a conversation.
They’re there.
Approach a cop and ask a silly question and you can get arrested. I know, sounds stupid. But I’m quite sure California has such a law. He can just be sitting at the side of the road filling out reports in his car.