Answer: When the Arabs searched the Alchemist, they found the Elixir of Life/Immortality and they found the Philosophers Stone. They allowed the Alchemist to keep these treasures because they did not believe that the Alchemist truly had those treasures. The Alchemist even says in the story: "When you posess great treasures within you, and try to tell others of them, seldom are you believed" (Coelho 138).
I think the Arabs think that Santiago and the alchemist are spies. They allowed Santiago and the alchemist to keep the treasure because both have claimed that treasure doesn't have to be something material. The treasure can be something spiritual.