At trial, ultimately this would be a matter for a jury. But "bad neighbourhood" definitely doesn't come into it, "I need it for self defence" doesn't constitute a lawful purpose.
The chef's defence gets to introduce any excuse the chef may believe he has, but it's like to be subject to fairly intense cross from the prosecutors. On the other hand sometimes these excuses are ludicrous, and the court is entitled to tell the jury that they don't have to credit such an excuse just because it wasn't explicitly rebutted by the prosecution.
The main thrust of this article is that it's wrong to even be _arresting_ these people never mind jailing them. And you can't solve the former in the courts.
Edit to add: I carry an Opinel no 8, which is technically illegal on two fronts, but would be utterly impractical as a weapon. I've only ever had one problem doing so: one got confiscated at security going on the Millennium Wheel about a decade ago, but there was no other comeback from that and they're dirt cheap, so I just bought another.