This is from the last paragraph here:
... no aircraft crosses directly over the pole – the closest route is 60 nautical miles (nm) away.
User Michael Shen of York University asked this originally under the article.
This article from AA (titled "Over the Top" by Gerard J. Arpey) says,
By the way, because of the limitations of older navigation systems, none of the polar routes we fly crosses exactly over the North Pole. At the Pole, an airplane’s compass changes from a due-north heading to due south, and that change of course could potentially lead to problems with earlier-generation autopilot systems. Fortunately, that is not an issue with the latest generation of long-haul aircraft, such as the Boeing 777s we fly, whose source of navigation is the extremely precise Global Positioning System (GPS). Nonetheless, to make polar flying equally effortless for both the new generation and the previous generations of aircraft, none of the approved civil polar routes comes closer than about 60 nautical miles from the Pole.
Until recently, regulators have insisted that twin-engine jets must always be within three hours of a suitable place to land. This is because the failure of one engine on such a plane is potentially far more serious than for one with three or four.
However, commercial flights do fly over the North Pole. For example:
It is possible to fly over South Pole as well. In 1977, PanAm 747Sp flew over South Pole while flying from Sydney to Recife. However, South Pole does not lie on the great circle route for too many points.
I'd like to augment Chris's answer by noting that the mechanical issue in question is called "gimbal lock". It occurs when a three-axis-of-freedom system, such as a gyroscope or compass suspended in two gimbal rings, gets two rings aligned in the same plane. The aligned rings are now "locked" and cannot detect motion in the plane of the rings.
You can imagine the problem by picturing a telescope (or a gun) on an azimuth-and-elevation mount, trying to track an aircraft flying directly overhead. As the plane approaches, the telescope elevates all the way to 90 degrees, but then to follow the plane, it would have to instantaneously spin around 180 degrees in azimuth. A human can easily solve the problem by turning the telesocpe as fast as possible and reacquiring the target on the far side, but an electronic system would have lost the target by the time it finished rotating. Depending on its complexity, it might not even be able to decide which direction to turn in the first place. The same is true of early gyrocompasses flying directly over the pole.
Compasses that suffer from this problem are usually designed to shut down when approaching gimbal lock to avoid damage to the mechanisms. The compass would then have to be reset and manually re-aimed to align with the Earth's rotational axis, which would probably have to wait until the aircraft landed. To avoid the possibility entirely, aircraft are advised to give the pole a wide berth, even though modern gyrocompasses do not suffer from this problem.
That's not to say no aircraft has ever flown over the poles. Admiral Richard Byrd famously made multiple flights over both the North and South poles, and there's no reason a gyrocompass couldn't be designed with polar travel in mind. (It would risk gimbal lock somewhere else on the planet instead.)