Funny how driving through a parking lot in considered suspicious behavior!
It probably wasn't the time to do it, but most parts of the USA you would not have needed to give them your ID as you had not broken any laws. Generally the police have no right to stop you and ID you unless you have been suspected of breaking the law, and driving through a parking lot certainly was not illegal. Too bad a bad cop would try to come up with something. This isn't 1940's Germany where they can stop you and ask for your papers! I can understand why you would not have pushed the issue dressed.