We know many things are makruh/disliked in Islam. Like standing while drinking water. But what is the evidence regarding the fact that doing something makruh is not sinful but one who stays away from it for the sake of Allah is rewarded? Could you provide the evidence for it from the quran or sunnah?
What is the evidence regarding the fact that doing something makruh is not sinful but one who stays away from it for the sake of Allah is rewarded?
It is important to know that makrooh is often translated by frowned upon. This means it is an act on which there's a doubt that it could be haram! In fact Allah described "makruh" in a verse in the meaning or context that it is (rather) haram, saying:
And do not walk upon the earth exultantly. Indeed, you will never tear the earth [apart], and you will never reach the mountains in height. (37)
All that - its evil is ever, in the sight of your Lord, detested. (17:37-38)
Further we learn from the sunnah:
I heard Allah's Messenger (ﷺ) saying, 'Both legal and illegal things are evident but in between them there are doubtful (suspicious) things and most of the people have no knowledge about them. So whoever saves himself from these suspicious things saves his religion and his honor. And whoever indulges in these suspicious things is like a shepherd who grazes (his animals) near the Hima (private pasture) of someone else and at any moment he is liable to get in it. (O people!) Beware! Every king has a Hima and the Hima of Allah on the earth is His illegal (forbidden) things. Beware! There is a piece of flesh in the body if it becomes good (reformed) the whole body becomes good but if it gets spoilt the whole body gets spoilt and that is the heart.
(Sahih al-Bukhari, Sahih Muslim and elsewhere)
Among the four different interpretation of doubtful (suspicious) things " الشبهات" ibn Hajar counted makrooh, the (apparent) contradiction of evidences, the different views of scholars and the permissible (mubaah).
A further narration shows also that one should avoid these doubtful things:
The Prophet (ﷺ) said "Both legal and illegal things are obvious, and in between them are (suspicious) doubtful matters. So whoever forsakes those doubtful things lest he may commit a sin, will definitely avoid what is clearly illegal; and whoever indulges in these (suspicious) doubtful things bravely, is likely to commit what is clearly illegal. Sins are Allah's Hima (i.e. private pasture) and whoever pastures (his sheep) near it, is likely to get in it at any moment."
Having this said here some evidences that say that if you leave something bad/haram for the sake of Allah you'd be rewarded:
When it occurs to my bondsman that he should do a good deed but he actually does not do it, record one good to him, but if he puts it into practice, I make an entry of ten good acts in his favour. When it occurs to him to do evil, but he does not commit it, I forgive that. But if he commits it, I record one evil against his name. The Messenger of Allah (ﷺ) observed. The angels said: That bondsman of Yours intends to commit evil. though His Lord is more Vigilant than he. Upon this He (the Lord) said: Watch him; if he commits (evil), write it against his name but if he refrains from doing it, write one good deed or him, for he desisted from doing it for My sake. The Messenger of Allah said: He who amongst you is good of faith, all his good acts are multiplied from ten to seven hundred times (and are recorded in his name) and all the evils that he commits are recorded as such (i, e. without increase) till he meets Allah.
There's a longer version of this hadith also in Sahih Muslim
Verily Allah recorded the good and the evil and then made it clear that he who intended good but did not do it, Allah recorded one complete good in his favour, but if he intended it and also did it, the Glorious and Great Allah recorded ten to seven hundred virtues and even more to his credit. But if he intended evil, but did not commit it, Allah wrote down full one good in his favour. If he intended that and also committed it, Allah made an entry of one evil against him. (Sahih Muslim and Sahih al-Bukhari and elsewhere)
Allah's Messenger (ﷺ) said, "Allah says, 'If My slave intends to do a bad deed then (O Angels) do not write it unless he does it; if he does it, then write it as it is, but if he refrains from doing it for My Sake, then write it as a good deed (in his account). (On the other hand) if he intends to do a good deed, but does not do it, then write a good deed (in his account), and if he does it, then write it for him (in his account) as ten good deeds up to seven-hundred times.' "
(Sahih al-Bukhari and elsewhere)
But there are two conditions for the one must do it for the sake of Allah and Allah alone (having this intention) and in accordance to Allah's guidance the shari'a. Allah says:
Say, "I am only a man like you, to whom has been revealed that your god is one God. So whoever would hope for the meeting with his Lord - let him do righteous work and not associate in the worship of his Lord anyone."