Ibn Al-Qayyim rahimahullah mentions in his book of many benefits, Al-Fawaa’id, that:
The origin of all sins, large and small, [are] three: the heart’s attachment to other than Allah, and obeying the force of [one’s] anger, and the force of [one’s] lust, which are shirk (associating partners with Allah), thulm (oppression of others and their rights), and the fawaahish (sexual abominations). For the extent of being attached to other than Allah is shirk and it is to claim another ilaah (deity) with Him; and the extent of obeying the force of one’s anger is killing; and the extent of [following] one’s lust is zina (adultery/fornication); and this is why Allah subhanahu has combined the three when He said:
[25:68] “And those who invoke no other ilaah (deity) along with Allah, nor kill the soul [whose killing] Allah has forbidden except for a just cause, nor commit illegal sexual intercourse…”
And these three things each invite to the other.
For shirk calls to thulm and to the fawaahish, just as ikhlaas and tawheed drive their possessor away from them. Allah ta’ala says [with regards to Yusuf alayhi assalam]:
[12:24] “… Thus it was, that We might turn soo’ and fah-shaa’ away from him. Surely, he was on of Our chosen slaves.”
… for soo’ is passion, and fah-shaa’ is zina.
And thulm as well calls to shirk and faahisha. For shirk is the worst of oppression, just as the most just of justice is tawheed. For justice is the associate of tawheed, and oppression is the associate of shirk. And for this reason, Allah subhanahu has combined them. As for the first [two], then in His saying:[3:18] “Allah bears witness that there is none worthy of worship but him, and the angels and those having knowledge (also give this witness)…”
And as for the second [two], it is like in what Allah ta’ala says:
[31:13] “… Verily, joining others in worship with Allah is a great thulm indeed.”
And faahisha calls to shirk and thulm, and no doubt if the desire has increased and it is not achieved except with some kind of thulm and the assistance of magic and the shaytaan; and Allah has united between zina and shirk when He said,
[24:3]: “The zaanee (male adulterer/fornicator) does not marry but the zaaniya (female adulteress/fornicator) or a mushrikah (female who is on shirk), and the zaaniya is not married except by the zaanee or a mushrik (male who is on shirk); and such a thing is forbidden for the believers.”
These are three things which lead towards one another, and command towards one another. For this reason, the weaker the heart is in terms of tawheed and the greater it is in terms of shirk, it will be more [likely to commit] faahisha and will be of greater attachment to (sexual) images and have a greater desire for them. Allah ta’ala says:
[42:36]: “So whatever you have been give is but (a passing) enjoyment for this worldly life, but what is with Allah is better and more lasting for those who believe and put their trust in their Lord.”
[42:37]: “And those who avoid the greater sins, and the fawaahish, and when they are angry they forgive.”So Allah has informed us that what is with Him is better for those believe in Him and put their trust in Him, and that this is tawheed. Then He has said, “and those who avoid the greater sins and the fawaahish,” for this is avoiding the command of the force of lust. Then He said, “and when they are angry they forgive,” for this is in opposition to the force of anger. So He has combined tawheed and chastity and justice, which are the sum of all good.