Why did Santiago have to go through the dangers of tribal wars on the outskirts of the oasis in order to reach the Pyramids? At the very end of the journey, why did the alchemist leave Santiago alone to complete it?
Santiago must endure trials in order to fulfill his Personal Legend and thus comprehend the Language of the World. One's goals are never reached unless we are willing to face fears. Additionally, suffering is a part of life. As the alchemist tells him, "No one fails to suffer the consequences of everything under the sun." All actions have consequences, but the alternative, no action, means that one will never understand their purpose in the world or truly enjoy their lives.
Although Santiago has already endured many obstacles, the tribal wars are the first to true endanger his life. He must be willing to risk literally everything.
The alchemist must leave him alone because every person's journey is an individual one; no one can help you realize your own dreams.