it has nothing to do with race. It is basically two-fold as why cops are so agressive. 1. The job has an appeal to jerks because of the instant power on basically everyone they encounter in their day. No other entry level job really offers this. 2. The daily hassle of dealing with idiots make the people who did not take the job to be a jerk, turn into one anyways. There are very good cops out there who do not allow their dealing with idiots affect their attitudes in general.
You are only required to ID yourself in two instances. If you're under arrest or if you're driving a motor vehicle in a public place. If you aren't driving or under arrest you don't have to ID yourself. If you lie though, that's a charge.
This sounds like something out of Supertroopers. If they do this to you while you walk, good luck while driving.
You can (in some states anyhow) be arrested for not telling an officer your name. In effect, that ruling made carrying ID mandatory. F the police.
I used to be homeless several years back. I got pulled over by an Asian cop. I am Asian. I was at Shepherd and Richmond and was walking to the Covenant House in Montrose. I thought he was gonna be a jerk, but he didn't lay a hand on me. He just asked for my ID and let me go without even running the ID. I had lost so much weight that he might have thought I was a runaway schoolkid.