The law works in mysterious ways sometimes.
Today we report that a man caught in possession of cocaine has been acquitted because the Court of Appeal believed the police who searched his car had no valid reason to suspect he had committed a crime.
His lawyer argued the man attracted police attention only by the colour of his skin.
"Racial profiling", as this called, is most unfair when innocent people are stopped and harassed and made to feel like criminals for no other reason than their appearance.
But when it turns out they have committed a crime, does the reason they aroused suspicion matter more than the crime? That is the question many will be asking when they read about this case.
There seems no dispute the man had 1.5 grams of cocaine in his car and he was charged with possession of a class A drug for supply. His lawyer made a pre-trail application, rejected in the district court, that the police had no proper grounds for the search and the Court of Appeal agreed.
The case was sent back to the district court where the judge accepted the arresting officer's statement that he was not motivated by race but the judge found the officer had no good reason to approach the car. So the man was acquitted.
This is madness. Laws against random search are an important element of civil liberties. But crime is important too. Police who execute a search for no good reason are taking a risk that nothing will be found and they could be in legal difficulty. But if something illegal is found, that surely is more important than the reason for the search.
In this case an illegal drug was found and three people in the car were arrested. The other charges included three counts of breach of bail. It is odd that the police could not claim to have reasonable grounds for suspicion but nearly as odd as the Court of Appeal's decision.
While the court has not accused the police of racial profiling it's judgment says, "Racial bias finds expression in policing as it does in other parts of the community."
It is possible the disproportionate number of Maori in New Zealand prisons is a result of racial bias in policing. Pakeha might not be stopped and searched to the same extent. But the solution, surely, is not to acquit people regardless of what the search has found. That would be mad.