Except she isn't just randomly picking directions, she is methodically exploring the valley. As someone noted above, that is pretty much the only guaranteed way to navigate a maze who's layout you don't know, so long as you take steps to avoid going the same way multiple times.