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.