We can understand that the Torah forbids many things and that we must take precautions in order so that we do not violate them. We can also understand that we need to put up fences to ensure that we don’t fall prey to temptations. The Mesilat Yesharim informs us that if one doesn’t actually takes precautions, it’s impossible to be able to survive the onslaught of the Yetser. However, even if one does take precautions, naturally he would still fall. It is only once he takes action that Hashem Himself intervenes and helps him not to sin. As the pasuk says צופה רשע לצדיק ומבקש להמיתו, ה’ לא יעזבנו וגו. This means that the Yetser who is referred to as the wicked, is looking to kill but a tsadik is protected as Hashem Himself provides him that protection. The reason for this is that the person is involved with being very careful not to stumble. However, to the one who doesn’t try to stay away from sinning, Hashem doesn’t help. On this Chazal say that you can’t be merciful to the foolish person who doesn’t try to help himself.