These few verses are amazing! When Moses (PBUH) was in the company of this righteous man he saw wonders. He was ordered to follow this righteous man and learn from him as he is taught some knowledge that Moses (PBUH) did not know. This knowledge was through a revelation from Allah. The deal was for the student, Moses, not to ask questions to the teacher, the man, unless the man tells him about it.
It was so difficult and so challenging not to ask questions. The man was doing very weird and most of the times evil things. He poked the ship of the people who gave him and Moses a ride. He slaughtered a little boy for no reason. He rebuilt a wall in a town whose people are so cheap refusing to even feed them when they had asked for food.
Moses asked one question after another. While terminating the learning deal upon Moses violation (asking many questions), the righteous man told Moses about the reasons these things happened. It turned out that the ship was damaged for a reason, the boy was killed for a reason, the wall was built for a reason. It turns out that it was all good at the end and this man just listened to some orders from Allah to do these things for a greater benefit.
This man represents the destiny of everyone of us. Bad things will happen to us and will hurt us. But who knows? Maybe there is some good in them. Maybe it is better for us than if they do not happen. That is exactly what this story told us.
This story is not meant for us to poke a ship or kill a boy or even build a wall. It is, rather, for us to know that whatever happens to us is by the permission of Allah and if we are patient, there will be good in them if not in this life, the life after.
You may ask, why did this man poke the ship, kill the boy or build the wall? What was his explanation? Well, you can go and read the whole story in the Quraan towards the end of surat al-Kahf (The Cave).
The man at the end said, “As for the ship, … “