"What if its a black person next time, how do they stop being black"
The point is "Breach of the peace"
In law, the police can use "Breach of the peace" if they believe that your presence could lead to violence taking place - a breach of the peace.
It could be used against a black person if they were in a place where the police felt their presence could lead to a breach of the peace.
It's a law that is used against people - against protestors and against anyone who is in a place where the police feel that the presence of that person could lead to a breach of the peace.
I have had it used against me before by the police.