Here’s what it comes down to from what I can see of your post:
You were being odd, by your own admission. You were out on foot, on a cold-ass evening, and you went back in and out of the store again once you were through shopping. You even imply that you usually would have driven, but that you didn’t want to de-snow your car, which to me further implies that you live in the kind of place where *even you don’t usually walk *around to the grocery store.
There are places like this all over, where people only drive, and there is nothing wrong with changing that pattern, but cops are trained to know and look for people behaving unusually. You were, by your own admission, behaving unusually.
Because of this, the cop flagged you.
From his perspective, the officer expected a quick interaction - I ask a question, the weirdo shows their ID, I’ve preserved security and order, and they go on their way, while I get back to my warm car.
The cop expected you to have your ID. Most people (again, that pattern-seeking training) carry their ID - if you paid for your groceries with a credit card, the grocer could have demanded ID to check the card. If you had a wallet or purse with your money, usually people keep their ID with their money or their phones.
He wanted to see ID for a quick confirmation that yes you are a normal citizen with papers, and that yes, you do live in the area, as a quick confirmation of your grocery shopping story. If you had shown him the ID, I would be willing to bet that his answer would be “stay safe and try not to freeze before you get home.” He may have watched you to see if you really did go into your house easily, and then would have chalked you up to a strange bird and forgotten about you.
He wanted a quick easy confirmation of your story by asking for your ID.
The cop FURTHER expected you to not know the relevant laws regarding him asking for your ID.
This gets into the thorny legal issues. I would WAG that somewhere in the range of 90% of people in the USA don’t actually KNOW their legal rights regarding police and showing ID, therefore, * The police officer doesn’t expect a run-of-the-mill citizen to know about these things. *
Two of the subsets of people who DO know the details of interactions with cops are 1) criminals, and 2) civil libertarians, both of whom are populations which generally are a pain in a police officer’s ass, *because a great many **officers *don’t know the laws regarding ID and police either. I am not saying whether the cops are right to feel this way or not, just that they do.
That said, the legality of the situation was pretty straightforward, and the cop did nothing wrong.
They are allowed to ask you do to anything, and if you comply willingly, then there is no real question of legality afterwards (unless your lawyer is really good) because you voluntarily gave the info to them. Sadly, it’s very hard to prove coercion or threats of violence due to the officer’s position, but it can happen. Without that, the interaction is just one where you’re being polite and nice to an officer.
On the flip side, you are also allowed to state your rights and the relevant statutes of the law, and the officer did the right thing - he checked with his supervisor, he knew you were right, and he let you go without hassling you further.
However, I would be willing to bet that he now remembers you, and will consider you an annoyance or a slight threat, and you better be damn sure your tags and driving habits are up to snuff for the next few months.
Is this a sad state of affairs? Perhaps. Am I willing to go to jail or be hassled by a not so nice cop because I’m not willing to show my ID when I’m out walking? Not really. I’d much rather send a nice open letter to the department and the town from my nice warm home, offering a friendly reminder of the relevant statutes and my opinion that it was an honest mistake on the officer’s part, and that I appreciate their work in keeping people safe.
Would that letter be entirely honest? Perhaps not, but there is always a place for tact, and it’s usually with the person who ISN’T in the position of power.