His head is cold, calculating, and extremely malevolent. Without the compassion or emotions that come from his heart, he only thinks logically. His body is benevolent and (without his evil head) full of compassion, making it a beloved leader.
Somehow, Caliph Kapok had his head removed magically and his head became logical and evil while his heart remained pure and noble. He tricked the group into helping him regain control of his body and separated Aladdin's head and boy as thanks. He reestablished a dictatorship but the gang came back and managed to separate the head from his body, ending the head's dictatorship and grateful, the body restored Aladdin to normal.