This may have to do with Alabama’s racist history and the public display of Ku Klux Klan outfits.
10.16.090 Public indecency–Accosting females–Appearing in disguise. No person shall exhibit or expose himself naked, or disguised, or in any indecent or offensive manner to any person passing in the public places of the city, or to persons living in the neighborhood, or rudely, insultingly or offensively accost any female, or appear in the streets or…
Legend has it that horses love ice cream, and this was a way to lure someone else’s horse to “follow” you home… ie, steal the horse! This law shows up in multiple areas, so this may well have been a low-key way to “find” a few new horses.