Its long tail serves as a ground to protect itself from its own high voltage power.
If it stores too much electricity, its behavior turns aggressive. To avoid this, it occasionally discharges excess energy and calms itself down.