It’s thanks to a constantly improving alliance of neurons and muscles.

Humans, like most animals, have two eyes.

And that’s for two very good reasons.

«You have a spare one in case you have an accident, and the second reason is depth perception, which we evolved to help us hunt,» said Dr. David Guyton, professor of ophthalmology at The Johns Hopkins University. But having two eyes would lead to double vision if they didn’t move together in perfect synchrony. So how does the body ensure our eyes always work together?

To prevent double vision, the brain exploits a feedback system, which it uses to finely tune the lengths of the muscles controlling the eyes. This produces phenomenally precise eye movements, Guyton said.

Each eye has six muscles regulating its movement in different directions, and each one of those muscles must be triggered simultaneously in both eyes for them to move in unison, according to a 2005 review in the Canadian Medical Association Journal. «It’s actually quite amazing when you think about it,» Guyton told Live Science. «The brain has a neurological system that is fantastically organized because the brain learns over how much stimulation to send to each of the 12 muscles for every desired direction of gaze.» 

Source: https://www.livescience.com/why-eyes-move-together.html