The judge cited problems with the statute, saying it was aimed at newsgathering activities protected by the First Amendment, and lawmakers should have increased penalties for reckless driving rather than target those who photograph celebrities.
City prosecutors said they would appeal the judge's ruling.
The law was prompted by the experiences of Jennifer Aniston, who provided details to a lawmaker about being unable to drive away after she was surrounded by paparazzi on Pacific Coast Highway.
On Tuesday, a friend of Bieber's was behind the wheel of the Ferrari when a California Highway Patrol officer pulled it over for speeding along Interstate 405, authorities said.
"This photographer evidently had been following the white Ferrari" and when it was pulled over after sundown he stopped, parked and crossed the street to snap photos, Los Angeles police Detective Charles Walton said.
The photographer stood on a low freeway railing to shoot photographs of the traffic stop over a chain-link fence, authorities said.
"The CHP officer told him numerous times that it wasn't safe for him to be there and to return to his vehicle," Walton said.
There were no sidewalks or pedestrian crossings along the street where the photographer had parked, so the driver of the car that struck him had no reason to expect a pedestrian, Walton said of the accident.
"It would have been very difficult for her to see him," the detective said.
It wasn't immediately clear how fast the motorist, a 69-year-old woman, was traveling, but she was not believe to be at fault and was unlikely to be cited, police said.
Harrison said he routinely tells his photographers to be safe when they are working.
"In any job you have to exercise a degree of common sense and caution," he said.
Harrison hopes celebrities and paparazzi examine their actions to ensure a similar event doesn't happen again. No photo is worth someone's life, he said.
"Everybody wants to be the first one to get that shot, get that scoop," Harrison said. "But at the end of the day, you can't spend money if you are dead."
Associated Press Writer Robert Jablon contributed to this report.