[[WMG: The Djinn is really [[StarWars Emperor Palpatine]]]]
That hissing, croaking voice, the cowled, disfigured face and hunched-over appearance, the way he encourages people to give in to their heart's desire so he can then twist it and use it against them... it can only be Palpatine! And for bonus points, when he assumes a more human form, it's in the form of a handsome, sophisticated SmugSnake in a business suit who charms and manipulates people, just like Palpatine in his chancellor days. But how, how could it have happened? Well, ''StarWars'' takes place a "long long time ago", and we know from the ExpandedUniverse that Sith Lords can exist as Dark-Side spirits after they've died. The Djinn is actually Palpatine's spirit, and the Djinn world is what the Dark Side of the Force looks like from the perspective of a fallen Sith. And Palpatine's feeding on people's weaknesses, bringing their wishes to life (maybe through a mind trick, by making people ''think'' that he's tormenting them so they'll [[YourMindMakesItReal die from the mental shock]]) and gradually making the Dark Side strong enough that he and the rest of the dead Sith Lords can manifest on Earth and claim it as their own. And Zoroaster must have been using Jedi techniques passed down over the centuries, originally gleaned from a Republic ship that crashed to Earth in ancient times. After all, where else could he have gotten that Sith holocron he used to trap Palpatine's spirit, which modern people mistakenly assumed was an opal?

[[WMG: The Djinn in the first two films is Iblis]]
Now mind you this is really more of a shot in the dark, but in my limited knowledge of the Muslim religion, but I'm pretty sure Iblis was a Djinn and in the first two films, the DJinn seemed to have a sort hierarchy to the other Djinn and was the most evil out of them and seemed to be the ruler of the Hell like dimension the Djinn dwell in.
** Well, leaving aside the fact that the Djinn in the Islamic religion are just another race of beings as capable of good and evil as humanity, Iblis/Shaytaan himself is neither impulsively evil nor powerful (he is prideful and disobedient and a hinderer of humanity, but he ultimately still worships God in his own way). His status in Islam is the exact same as it is in Judaism; God just created him to be an obstacle for humanity on the path to true faith through nudging humans towards evil inclinations but cannot actively influence or force outcomes except through subtle temptations, contrary to the Devil of Christianity who seems to be some kind of dark god. Iblis serves Allah's design like all other aspects of Creation. Also, he does not rule Hell (which in truth is an idea drawn from Paradise Lost rather than actual Abrahamic theology). That role is assigned to an Angel named Malek in Islam, who in turn governs Hell on the orders of the Almighty.

[[WMG: The Djinn is only compelled to grant wishes from the one who woke him]]
He grants wishes to others in order to wreak havoc and acquire power from their souls. However, he dosen't have to, or at least he can give such people an opportunity to wish again, or "rephrase" their wishes. For example in the second film, the man in the jail cell just wanted the Djinn's shoes. The Djinn didn't immediately comply because he thought it was a stupid wish, and was able to get the man to instead wish to "go through the bars." The security guard asked the Djinn to leave, and the Djinn "seemed" to be compelled, but the security guard then changed his wish.