"Ever wonder why dogs need to get themselves into just the right position to do their business? As it turns out, dogs align their body axis according to Earth's magnetic field when they squat to poop—a behavior that changes when the magnetic field is unstable. But why do they do it?
The results of this recently published paper from Frontiers in Zoology sound goofy, but the takeaway is all in the title, "Dogs are sensitive to small variations of the Earth's magnetic field." The researchers measured the direction of the body axis of 70 different dogs while they were off-leash during 1,893 acts of defecation and 5,582 acts of urination over a two-year period. They found that, under calm magnetic field conditions, dogs prefer to orient their bodies along the North-South axis when they poop. However, this behavior did not occur during unstable magnetic field conditions, and the best predictor for this change of behavior was the rate of change of magnetic declination.
This means that the dogs are responding to changes in the polarity of the magnetic field rather than changes in intensity. It's that change in behavior that has the authors of this paper particularly excited, since it's the first time, according to the paper, that magnetic sensitivity has been proven in dogs and that a predictable behavioral reaction from natural magnetic field fluctuations has been unambiguously observed in mammals".