Presumably under islamic law its illegal to have sex before marriage and i suppose in other countries he would be beheaded?
The judge here is clearly wrong as the girl was a minor. He should be in jail. However, as he is not, perhaps some locals might like to enforce their own sentence. I dont think anyone would be upset if they did.