And such is du’a (supplication), for it is one of the strongest factors that repels evil, and brings about desired good. However, it is possible that its effects are not seen, either because of a weakness in the du’a — for example, the du’a is not beloved to Allah, since it contains in it transgression, or because of a weakness in the heart of the one making du’a. So the heart does not turn to Allah, and unify its energy in asking for it while it makes the du’a, so it is like a very weak bow, from which the arrow leaves with weakness. Another cause for which the du’a is not answered is the presence of a preventing factor, such as eating haram sustenance, or being unjust, or there being a layer of filth due to sins over the heart, or that the heart has been overtaken by play and heedlessness.
(Ibn al-Qayyim)