“The Ways of the Emorite”
In many places in the Talmud, we find practices forbidden because they are "the ways of the Emorite" (darkei Emori). In most cases these are customs that seem like silly superstitions, such as uttering special incantations when encountering certain animals. According to the Mishna, carrying a grasshopper egg as a remedy is also an example of the "ways of the Emorite", but we rule in accordance with Abaye and Rabba that "anything which promotes healing is not included in the ways of the Emorite" (Shabbat 67a, SA OC 301:27).
The Beit Yosef (YD 178) explains in the name of the SeMaG, that the cryptic expression "the ways of the Emorite" comprises two distinct prohibitions. One is the prohibition against sorcery, which was apparently widespread among the Emorites; the other is the general prohibition for Jews to gratuitously imitate other nations, as commanded in the verse "And don't walk in their ways" (Vayikra 18:3).
Rav Kook explains that the Torah's mandate to the Jews not to imitate other nations exemplifies a universal principle: that every nation should take steps to maintain its unique national character and culture, and to resist alien influences that undermine them. This is because every nation has special characteristics that complement the rest of mankind.
But for the Jewish people this principle is especially important, because of the unique expression of the Divine Will and its application found among us. This means that maintaining our special character is critically important for the world. It also means that maintaining our culture is more difficult; our inner character is so delicate that foreign habits are particularly likely to endanger and undermine them.
Rav Kook adds that a particular custom may be found in one particular nation for two reasons. One reason is that this custom is uniquely suited to that nation's character; in this case members of other nations, and particularly Jews, need to take special care in imitating such a custom, to make sure that it doesn't contradict their own character. This is particularly true if the custom is found among a relatively backward nation such as the Emorites.
However, sometimes a custom is found in one particular nation even though it is inherently suited for all mankind. It just turns out that one particular nation was lucky enough to discover the benefit of this practice. In this case, there is no prohibition for us to imitate the practice, and it is even appropriate to do so: "Anything which promotes healing is not included in the ways of the Emorite" (Ein Ayah Shabbat 67a).