Companion of Moses mentioned in Surah Kahaf is called Khidr in the secondary man made sources known as Hadiths. In Quran this entity is called Abdan which means a servant.
According to my understanding this Abdan (Servant) was an angel sent to train Prophet Moses. Angels we know are entrusted by the God to enforce His directives in accordance with His scheme and will. According to this scheme, He creates and destroys life, blesses some people with favors and deprives some people from these favors to make this world a place of trial and test.
The incidents mentioned in this story are of similar nature. A child was killed and a ship made defective at the behest of the God. A human being has no authority to do such deeds even if he is a Prophet. No person is above the laws of the Shari‘ah set by God.
THE PURPOSE OF MENTIONING THIS STORY IS:
(i) All that happens in this world happens with the permission and will of the God. Nothing can happen unless He allows it.
(ii) All of God’s works and actions are based on profound wisdom. If He sometimes allows evil to prosper, it is not that He likes evil; it is at times to give a chance to the evil doers to do more and more evil so that they can be given a grave punishment later on. If He tries and tests pious people by putting them through difficulties and hardships it is not that He dislikes them but that He wants to bless them with a greater reward on showing patience.
(iii) The profundity of God’s knowledge cannot be grasped by us in totality. The overall philosophy and wisdom about many of His actions will be revealed to us in the Hereafter. Therefore, we should adopt an attitude of gratitude and thanksgiving to Him in circumstances when we are not able to comprehend His will and actions, and we should resign and submit ourselves to Him.
(iv) Also it was part of the anger management program for Moses and a lesson for him so that he can see the wisdom behind the wisdom of God and at the same time to control his anger.
Keeping in view these aspects of the story, it is pretty obvious that the inference that there are people in this world who are above Islamic laws and have been given a right by God to do things which are prohibited in Islam has no basis. It is reiterated that the whole episode delineates the enforcement of the God’s will through his trusted angels for specific purposes and has nothing to do with human proceedings.
MOSES AND SERVANT (Surah Kahaf 18:62-82)
18:60 And Moses said to his youth: “I will not stop until I reach the junction of the two seas, or I spend a lifetime trying.”
18:61 But when they reached the junction that was in-between, they forgot their fish, and it was able to make its way back to the sea in a stream.
18:62 And when they passed further on, he (Moses) said to his youth: “Bring us our lunch; we have found much fatigue in this journey of ours.”
18:63 He (Youth) said: “Do you remember when we rested upon the rock? I forgot the fish, and it was the devil who made me forget to remember it. It made its way back to the sea amazingly!”
18:64 He (Moses) said: “That is what we have been seeking!” So they went back retracing their steps.
18:65 So they came upon a servant (Abdan) of Our servants whom We had given him mercy from Us and We had taught him knowledge from Us.
18:66 Moses said to him: “Can I follow you so that you will teach me from the guidance you have been taught?”
18:67 He (Abdan) said: “You will not be able to have patience with me.”
18:68 “And how can you be patient about that which you have not been given any news?”
18:69 He (Moses) said: “You will find me, God willing, to be patient. And I will not disobey any command of yours.”
18:70 He (Abdan) said: “If you follow me, then do not ask about anything until I relate it to you.”
18:71 So they ventured forth until they rode in a boat and he made a hole in it. He (Moses) said: “Have you made a hole in it to drown its people? You have done something dreadful!”
18:72 He (Abdan) said: “Did I not tell you that you will not be able to have patience with me?”
18:73 He (Moses) said: “Forgive me for what I forgot, and do not be hard upon my request with you.”
18:74 So they ventured forth until they came upon a youth, and he killed him. He (Moses) said: “Have you killed an innocent person without justice? You have done something awful!”
18:75 He (Abdan) said: “Did I not tell you that you will not be able to have patience with me?”
18:76 He (Moses) said: “If I ask you about anything after this, then do not keep me in your company. You will then have a reason over me.”
18:77 So they ventured forth until they came to the people of a town. They requested food from its people but they refused to host them. Then they found a wall which was close to collapsing, so he built it. He (Moses) said: “If you had wished, you could have asked a wage for it!”
18:78 He (Abdan) said: “For this, we will now part ways. I will inform you of the meanings of those things that you could not have patience over.”
18:79 “As for the boat, it belonged to some homeless people who were working the sea, so I wanted to damage it as there was a king coming who takes every boat by force.”
18:80 “And as for the youth, his parents were believers, so we were concerned that he would oppress them by his transgression and disbelief.”
18:81 “So we wanted their Lord to replace for them with one who is better than him in purity (Zakatan) and closer to mercy.”
18:82 “And as for the wall, it belonged to two orphaned boys in the city, and underneath it was a treasure for them, and their father was a good man, so your Lord wanted that they reach their independence and bring out their treasure as a mercy from your Lord. And none of what I have done was of my own accord. That is the meaning of what you could not have patience for.”
According to my understand that Abd was member of the high council/exalted assembly (mala -ial- aaala). God is a head of this high council/exalted assembly (mala -ial- aaala).
Pay attention to the word “We” which represents the high council/exalted assembly.
18:80 “And as for the youth, his parents were believers, so => we <= were concerned that he would oppress them by his transgression and disbelief.”
18:81 “So => we <= wanted their Lord to replace for them with one who is better than him in purity and closer to mercy.”
According to my understanding mysterious wandering man known as “Abd” was an Angel member of the high council/exalted assembly which was sent by God to train the Moses.
HIGH COUNCIL/EXALTED ASSEMBLY (MALA -IAL- AAALA)
37:8 They cannot listen to the high council/exalted assembly; and they are bombarded from every side.
38:69 “I had no knowledge of the high council/exalted assembly, that they had quarreled.”
40:7 Those who carry the Throne and all those surrounding it glorify the praise of their Lord, and believe in Him, and they seek forgiveness for those who have believed: “Our Lord, You encompass all things with mercy and knowledge, so forgive those who repented and followed Your path, and spare them the agony of Hell.”
69:17 And the angels will be on its borders; and the Throne of your Lord will be carried, above them on that Day, by eight.
I believe there are Nine Members of this high council/exalted assembly, God and the Eight Angels.
God Knows the Best.