But that's the point. As I understand your original post, you created a disturbance with the clerk. You were therefore subject to the investigative processes of the police who responded. Ergo, you were required to present your identification.
The thing I don't get is what is the big deal about giving him your I.D. People who do that typically have a reason. Now I'm curious.