Between this and other potential electromagnetic phenomena like earthquake lights (which might or might not be power lines swinging and shorting out, creating sparks, or transformers blowing up), there's a lot we don't understand about earthquakes yet.
Piezoelectricity is one of the proposed mechanisms that might explain both earthquake lights and animal behavior changes minutes or hours before the actual shocks start.