It's all rooted in the case of David McDonald, who was arrested and searched by Oakland police while urinating in a Berkeley parking lot. At the time, the office charged McDonald with littering (hee) and searched him, allegedly discovering cocaine in one of his pockets.
Since 5-0 wouldn't have had any grounds to search McDonald if he hadn't been performing an unlawful act, establishing public urination as a lawful activity would have made any evidence found during the search inadmissable -- which would mean no drug charges.