Ibn Tamiyyah stated that The protective jealousy that Allah attributes to Himself is provoked either when a believer commits that which is forbidden to him, or when immoral deeds are committed, either openly or secretly.
End quote from al-Istiqaamah (2/9-11)
Ibn al-Qayyim (may Allah have mercy on him) said: Protective jealousy implies hatred and resentment (of bad deeds), so Allah told us that no one has protective jealousy greater than His, and because of His protective jealousy He prohibited immorality and obscenity. According to those who deny the divine attributes, protective jealousy is regarded as a matter of feelings and emotions, like shyness, joy, anger, wrath, resentment and hate. So in their view, it cannot be attributed to Allah. But it is well-known that these divine attributes are attributes of perfection that are entirely praiseworthy according to reason, religious texts, customs and traditions, and sound human nature; and their opposites are blameworthy according to reason, religious texts, customs and traditions, and sound human nature. If someone has no sense of protective jealousy, then it is all the same to him whether one commits immoral deeds or refrains therefrom; such a person is utterly blameworthy and deserves to be rebuked harshly.
End quote from as-Sawaa‘iq al-Mursalah (4/1497