Why do people transgress the limits of Allah, especially when they know those limits? The two main reasons are failing to trust in Allah and falling victim to ones vain desires and thinking. Ibn Al-Qayyim describes this as follows:
No one can indulge in unlawfulness except for two reasons, the first of which is failing to trust in Allah, despite the fact that if one obeys Him, he will surely be granted the best of lawful gains. The second reason is knowing that whoever abandons anything for the sake of Allah, surely He will grant him something better than what he has abandoned. Unfortunately, his vain desires surpass his patience and his inclination overpowers his mind. The first kind of person has poor knowledge, and the second one has poor insight.
Yahya bin Mu’adh, who was one of the preachers said (to Ibn Al-Qayyim), “He whom Allah opens his heart with invocation, surely Allah will respond to him.” I (ibn Al-Qayyim) added, “but he whom Allah opens his heart, and feels in need of Allah, and his hope is strong, then Allah will respond to him.” (Source: “Al-Fawwaid” by Ibn Al-Qayyim)
The lesson for us is that first, we should start to become more aware of matters when we cross Allah’s limits and our hearts don’t even feel the gravity of those sins. Second, we should get back to instill Allah’s trust and the importance of His commandments in our hearts so we can become more sensitized to sinful situations.