Another example of Allah’s preserving the religion of His servant is that a servant could pursue a wordily office such as leadership or undertake a wordily enterprise such as trade and Allah, knowing what is good for him, intervenes between him and his goal. The servant, heedless of what has taken place, hates what has happened.
Ibn Masud said, ‘A servant intends to undertake a trading venture or aims for leadership hoping that it will be facilitated for him. Allah will look at him and say to the Angels, ‘Avert him from it for if I was to make this matter easy for him, I would cause him to enter the Fire!’ So Allah would avert him from it and he, in a state of agitation, will complain, ‘So-and-so beat me! So-and-so outsmarted me!’ Yet all it is, is Allah’s good-grace, Mighty and Magnificent if He!’
Yet more astonishing is that a servant could strive to do an action of obedience, however this particular action would not be the best course for him, so Allah will intervene between him and it in order to preserve him, and he, all the while, remains heedless.
One of the early people would frequently ask for martyrdom, so a voice called out, ‘If you were to embark on a military expedition, you would be captured and during your captivity you would convert to Christianity, so stop asking for this.’
Therefore, in summary, whoever safeguards the limits of Allah and carefully tends to His rights, Allah will undertake to safeguard him in his wordily and religious life, in this world and the next.
The Legacy of the Prophet Ibn Rajab Al-Hanbali p48-49