Natalie Schachar has a great piece about the widespread dogshit everywhere on the sidewalk in Buenos Aires.
This is one of these things where you see how rules and norms interact. The fact that in major American cities people generally clean up after their dogs is clearly related to the laws on the books about this, but it's also clearly the case that in practice police departments are not dedicating vast resources to the issue. And in fact though the gains from not having dog shit on the sidewalk are meaningful, they're relatively small compared to the costs of a rigorous enforcement of pooper scooper laws. But what I recall from growing up in New York in the eighties is that the norms shifted to the point where enforcement costs are now very low simply because there's not that much violation.
You see this kind of thing all the time. Where violations are rare, the rareness of violations creates a self-sustaining norm. The rareness of violations also makes it relatively cheap and easy to identify and punish rulebreakers, which keeps reenforcing the low violation equilibrium.