Ignorant or fishing, more likely the latter. Trying to get you to open your mouth and give them reason to investigate further, at best. At worst try to get you to incriminate yourself.
The real problem with this is it comes off as ignorance and arrogance and leaves a huge negative wake. If you were unknowledgeable about they law you could say, "A law enforcement officer told me that having a gun in your car was illegal." And FUD spreads.
I know why LEOs do it, it is such an amazingly successful tactic from what I hear. I just wish they could see all the downsides.
I am a member of the human race. All relevant information is to be found in my passport. And except when there is good reason for suspecting me of some crime, I will refuse to submit to police interrogation, on the grounds that any such interrogation is an intolerable nuisance. And life being as short as it is, a waste of time. Any infringement on my privacy, or interference with my liberty, any assault, however petty, against my dignity as a human being, will be rigorously prosecuted-Orson W.