OP here. When I got home from my journey, I quickly jotted down everything that was said. One thing that stuck out was that the officer said, “you’re not in trouble or anything, I just want to know who you are”. By sayng that, he admitted to me that he had no reason to believe that I’d been involved in a crime, or was planning a crime. Therefore, he was not legally justified to ask me for ID.
Some other questions that have been brought up. I live in Virginia. We do not have a stop and identify law here.
How is exiting a store, then realizing I’d forgotten something and going back in, suspicious activity? Plain and simple, I was detained with no probable cause. I have a friend who is a lawyer (albeit in another state), I mentioned this to him. He told me that I absolutely did the right thing. I protected my 4th Amendment rights.
Another response above is that I should’ve been polite (not sure of the exact verbiage used). I WAS polite. I was very polite and respectful to this officer.