http://en.wikipedia.org/wiki/3D_image#Wiggle_stereoscopy
from the article:
"Wiggling works for the same reason that a translational pan (or tracking shot) in a movie provides good depth information: the visual cortex is able to infer distance information from motion parallax, the relative speed of the perceived motion of different objects on the screen. Many small animals bob their heads to create motion parallax (wiggling) so they can better estimate distance prior to jumping."