Based on the clues we get in the movie, it's safe to say that Genie is incredibly old and served plenty of masters before Aladdin. One can only imagine how many proposterous and/or disastrous wishes Genie must have granted over the years previous. When we first meet him, we learn the rules of Genie's wishes: 1) He won't kill anyone 2) He won't make anyone fall in love and 3) He won't bring anyone back from the dead. While you might reasonably guess that these rules have been in place from Day One, remember what Genie says about Rule #3:
The first half of that sentence implies that, at the very least, Genie witnessed a reanimated corpse in action, and didn't like what he saw. But the second half implies that he did the deed himself, at least once, and the result was so horrible that a rule had to be introduced to make sure it can never happen again. That basically confirms the idea that the rules weren't always in place, and had to be introduced after the fact. Meaning that at some point, Genie probably killed a guy at his master's behest.
That a lampholder wanted to eradicate an enemy or brainwash a lover isn't especially surprising, though it is disconcerting to think that this lovable character once used his phenomenal cosmic power to murder someone. Really though, it's Rule #3 that has the most disturbing implications.
Given Genie's distaste for the practice, a ressurection probably went wrong in one of two ways. Best case scenario: Genie zapped a dead body what came back was an evil entity, a la Pet Sematary. Worst case scenario: Genie accidentally unleashed a zombie apocalypse. It might seem like a stretch, but it gels with a prevailing theory that places Aladdin's time period in the far-flung future -- admit it, that definitely explains why Genie has such a good Jack Nicholson impression. Bearing that in mind, it could be that one of Genie's wishes kicked off an undead plague that took over the world, and it took humanity 10,000 years to get back to the Middle Ages. Man, the phrase "prequel trilogy" never sounded so good.
Agrabah's unnamed Sultan is the classic doddering cartoon daddy. He's more or less a mix of Homer Simpson and Maurice from Beauty and the Beast. He seems like a sweet man and a kind father -- until you realize that this buffoon lives in luxury while his city festers in squalor. Seriously, look at how the palace towers over the slums of Agrabah (aka every part of Agrabah that is not the palace).
This is a city that contains hundreds, if not thousands of impoverished people. Aladdin is so poor that he has to steal bread, and gives the bread away when he realizes there are children that are even poorer than him. Everything we see in the movie makes it look like a pretty shitty place to live. But hey, at least the Sultan gets to live it up with his toys...
...even though it's at the cost of children longingly looking at rotten fish bones.
The movie never acknowledges this. Aladdin is about a hero's journey to defeat a villain with the help of a friend, and also a princess' fight to marry whoever she wants. The "good guys" do manage to get a happy ending, but the rest of Agrabah still suffers. Al agonizes over whether he should free Genie, when but never considers the idea that the children he just fed are, at that very moment, still trapped in poverty. But hey, maybe they'll have their own magical adventures and go on to ignore the plight of their contemporaries. If we're really lucky, they'll also sing some catchy songs.