As the story progresses and Santiago comes closer to the treasure, he becomes more focused on his growing understanding of the mystical force that imbues everything, called the Soul of the World. The time he spends crossing the desert on his way to the pyramids teaches him to pay attention to the world around him and to see all of creation in his surroundings, even in a single grain of sand.
The knowledge he gains from the desert allows him to recognize nature as a single, unified whole. His greatest spiritual advancement, however, comes after he meets the alchemist, who helps him to understand himself and to read the omens in his environment. Santiago ultimately learns to communicate with the wind and the sun and the Hand That Wrote All, a force evidently synonymous with God or Allah.