Horses actually have an excellent sense of direction. In Medieval Iceland it was not uncommon to borrow a horse, ride home, and then simply turn the animal loose - and it would go home on its own.
They memorize trails that you ride regularly - including the places where you canter if you always canter in the same place. Trust me, they know. But they have also been known to work out where short cuts back home that they have never taken are, and they always know which direction the barn is in. If you get lost on a horse, sometimes you can drop the reins and let them find their way home with you (although not always).
Wild horses roam over fairly large territories, so it's not surprising that they would know the way to get to certain places, such as a good source of water.