As electricity builds up inside its body, it becomes more aggressive. One theory is that the electricity buildup is actually causing stress.
If it stores too much electricity, its behavior turns aggressive. To avoid this, it occasionally discharges excess energy and calms itself down.