In verse number 94 (surah-Al-Ma’idah), Allah loves it when we stay away from things for His sake.
Only to test you Allah allows certain things He has prohibited to be accessible to you and He makes it easy for you to do achieve that but you stay away for His sake.
When a person is married for the sake of their spouse. They would sometimes stay away from adultery Etc. But if you were to do it for the sake of Allah, it is far broader and you will achieve the happiness of your spouse too subhanallah….
Even if the person comes to you and really asks you to commit the sin with them, if you were to abstain bearing Allah in mind, aren’t you on a Higher level? You achieve the Comfort.
When adultery is very easy to commit and you still stay away from it. You’ve arrived at a different level in your relationship with Allah.
When things are prohibited, sometimes Allah might test you by making it accessible; it is so tempting to earn money in the wrong way. Allah says, do you prefer me or you prefer the money that is earned in a wrong..
Why? SubhanAllah, it’s up to you to prove yourself to Allah.
So those who stay away they have the correct relationship with Allah.