Police spokesman Albie Esparza said the arrests were simply an attempt to enforce compliance with the law, which the city enacted after residents complained about people in various stages of undress.
"We're not here to arrest and cite people if we don't have to, but if we have to, we will enforce the law," he said. "We want to admonish as many people as possible and try to gain compliance."
Activists challenging the measure also had argued that the ordinance was unfair because it grants exceptions for nudity at permitted public events such as the city's gay pride parade. They complained that forcing people to cover up would undermine San Francisco's reputation as a city without inhibitions.