Sheriff Depts. depending on how the state is structured usually only have patrol duty on county grounds, highways, or unincorporated areas and don't patrol in any municipality that runs a police force.
Sounds like these were Police, with a chief hired-fired by a Mayor, or a Fire & Police commission, depending on the size of the city.
And sure, the police won't enforce this law... as long as they like you, aren't fishing for something to charge you with, aren't having a bad day due to something that has nothing to do with you, or aren't worried about their status under the "We don't have quotas!" system for citations/arrests and employment review/promotion.