It's simple. It's implicitly illegal to be black in Sanford. So, according to the implicit law, a black person walking in a white neighborhood is breaking the law and is hence behaving in a threatening and illegal manner.

If they just went ahead and explicitly made being black illegal then not only would all confusion vanish but the justice department would remove the mayor and city council and take over to prevent this sort of thing from happening in the future.

Explicit is almost always better than implicit.