What is the overall goal of the Speckled Kingsnake's tail-shaking mimicry tactic?

Answer

To deter an attack by appearing more dangerous

The defense is designed as a bluff, leveraging mimicry to make the non-venomous snake seem more dangerous than it actually is to ward off potential predators.

What is the overall goal of the Speckled Kingsnake's tail-shaking mimicry tactic?
behaviorreptiletailsnake