Further evidence for this is Allah’s saying, exalted be He:
7:157 “He makes lawful for them the good things and forbids them the foul things.”
This explicitly shows that what is lawful was good before it was made lawful, and that what is foul was foul before it was prohibited. The goodness of the former and the foulness of the latter did not derive from the mere act of permitting or prohibiting them, for two reasons.
First, this is one of the signs of his prophethood that Allah presented as evidence against the People of the Book. He said:
7:157 “Those who follow the Messenger, the unlettered Prophet, whom they find mentioned in their Torah and Gospel—he commands them to do what is right and forbids them from what is wrong, makes lawful for them the good things and forbids them the foul things, and relieves them of their burden.”
If goodness and foulness derived solely from prohibition and permission, this would provide no evidence. It would amount to saying, “He permits them what he permits and forbids them what he forbids.” This, too, is untenable, since it conveys nothing meaningful. That is the second reason.
It is therefore established that he made lawful what was intrinsically good before being made lawful. By permitting it, he endowed it with an additional goodness, so that its goodness now arises from both sources together.
Reflect deeply on this point: it will reveal to you the secrets of the Sharia and give you insight into its beauty, perfection, splendor, and majesty. You will see that the wisdom of the Wisest of judges makes it impossible for the Sharia to be otherwise than it is, and that Allah Most High is exalted above that, just as He is exalted above all other things that befit Him.
[Surah al-A‘rāf (7): verses 175 to 176]
“Relate to them the account of the one to whom We gave Our signs, but he cast them off. Satan then pursued him, and he became one of those who went astray. (175) Had We willed, We would have raised him through them, but he clung to the earth and followed his own desires. His likeness is that of a dog: if you drive it away, it pants, and if you leave it alone, it pants. Such is the likeness of the people who denied Our signs. So recount the stories, that they may reflect. (176)”