Is the will of Allaah the reason why people go astray?
Question

                When a person goes astray and deviates, does that happen by the will of Allaah or does Allaah not decree that?
Praise be to Allah.
    Shaykh al-Shanqeeti (may Allaah have mercy on him) said: 

    Allaah says (interpretation of the meaning): 

    “He whom Allaah guides, he is the rightly-guided; but he 
    whom He sends astray, for him you will find no Wali (guiding friend) to lead 
    him (to the Right Path)”[al-Kahf 18:17]

    In this aayah, Allaah explains that guidance and misguidance 
    are in His hand alone; whomsoever He guides none can lead astray, and 
    whomsoever He sends astray, none can guide. This meaning is also expressed 
    in many other aayahs, such as the following (interpretation of the 
    meaning): 

    “He whom Allaah guides, he is the rightly-guided; but he 
    whom He sends astray, for him you will find no Wali (guiding friend) to lead 
    him (to the Right Path).”[al-Israa’ 17:97] 

    “Whomsoever Allaah guides, he is the guided one, and 
    whomsoever He sends astray, — then those! they are the losers”[al-A’raaf 
    7:178]

     “Verily, you (O Muhammad) guide not whom you like, but 
    Allaah guides whom He wills”[al-Qasas 28:56] 

    “And whomsoever Allaah wants to put in Al-Fitnah (error, 
    because of his rejecting of Faith), you can do nothing for him against 
    Allaah”

    [al-Maa’idah 5:41] 

    “If you (O Muhammad) covet for their guidance, then 
    verily, Allaah guides not those whom He makes to go astray (or none can 
    guide him whom Allaah sends astray). And they will have no helpers”

    [al-Nahl 16:37] 

    “And whomsoever Allaah wills to guide, He opens his breast 
    to Islam; and whomsoever He wills to send astray, He makes his breast closed 
    and constricted, as if he is climbing up to the sky”

    [al-An’aam 6:125]

    And there are very many similar aayahs. 

    From these and similar aayahs in the Qur’aan it may be 
    understood that the view of the Qadariyyah, who say that man is independent 
    in his actions, whether good or bad, and that does not happen by the will of 
    Allaah but rather by the will of the person, is false. Glorified and exalted 
    be Allaah far above anything happening in His dominion that does not happen 
    by His will.