From my understanding, genies originated in the religion of Islam, in which they are supposed to be demons (fallen angels / evil spirits). So why would something so evil be something that was associated with something nice like granting you a wish?