It's called police and prosecutorial discretion to discern when to arrest and prosecute; and that situation in particular is also the result of a decision of the jury of the court of public opinion.
Permits are required to sell on the street in Oakland. But not everyone who sells has a permit, and not everyone who is confronted about not having a permit is arrested and prosecuted. There are simply too many potential cases to prosecute. And, the police officer has the discretion to ticket or not. When you get pulled over while driving or riding a bike, you don't always get a ticket, since the officer has the option of discretion.
When the officer responded and found an eight year-old selling water, he obviously was aware of the fact that it was a violation. But he was also aware of the court of public opinion. What is it going to look like if he arrests an eight year old and their parent?
Allison Ettel was right, in a purely legal sense, to make the report. And technically, the child (and adult) needed a permit. And could have been ticketed and prosecuted. But it was Ettel was tried and convicted in the court of public opinion, and she lost her case. Happens a lot.