The publicly owned slaves were Scythians -- nomads with a barbaric reputation and unrivaled archery skills. And their elected leaders gave them Judge Dredd-scale peacekeeping rights; they ended riots, arrested people, and performed prisoner transport and guarding duties. They also had a license to kill when necessary and performed executions.
And, oh yeah, the whip thing: Despite their aforementioned archery skills, they most likely didn't carry bows as weapons. The magistrates decided to arm them with whips instead, presumably so they could keep things peaceful and kinky at the same time. Athens had a police force made up entirely of Indiana Joneses and Simon Belmonts.
"Look, I get that you guys need to practice, but could you at least take away
the second target from my crotch?"
Even though arming a bunch of slaves and asking them to enforce the law sounds totally bananas, it apparently worked pretty well. Rome even later copied the system with their awesomely named Triumviri Nocturni or "three judges of the night," because Rome was Mega-City One, apparently.