Surah Al-Baqarah: 215
"They ask you what they should spend..."
Ibn Abbas—may Allah be pleased with both of them—stated in the narration of Abu Salih: "Amr ibn al-Jamuh was a very old man possessing much wealth. He said: 'O Messenger of Allah, what should we give in charity, and upon whom should we spend?' So this [verse] was revealed."
In a narration by ‘Ata’ from him, it is stated that it was revealed regarding a man who came to the Prophet—may Allah bless him and grant him peace—and said: "I have a dinar." He replied: "Spend it on yourself." The man said: "I have two dinars." He said: "Spend them on your family." He said: "I have three." He said: "Spend them on your servants." He said: "I have four." He said: "Spend them on your parents." He said: "I have five." He said: "Spend them on your relatives." He said: "I have six." He said: "Spend them in the way of Allah the Exalted."
From Ibn Jurayj it is said: "The believers asked the Messenger of Allah—may Allah bless him and grant him peace—where they should place their wealth, so this [verse] was revealed: 'Say: Whatever you spend of good is for parents, relatives, orphans, the needy, and the traveler.'"
The apparent meaning of the verse is that he was asked about the object of the expenditure (the charity itself), but he answered by explicitly stating the recipients (the beneficiaries), because that is of greater importance; for the value of the expenditure is considered in light of them. He indicated the nature of the object of expenditure implicitly, for "of good" (khayr) implies that it must be lawful, as anything other than that is not termed "good." He addressed this matter even though the question did not strictly necessitate it, because the question was for the sake of learning, not disputation. The duty of the teacher in this regard is that of a compassionate physician who seeks out what provides healing, whether the patient requests it or not. Since their need to know upon whom to spend was like their need to know what to spend, he addressed both matters. This is like one who has bile and asks a physician for permission to eat honey; the physician says: "Eat it with vinegar." Therefore, the discourse is in the style of the Wise (uslub al-hakim).
It is possible that the expenditure itself was also mentioned in the question, as indicated by the first narration regarding the cause of revelation, but it was omitted in the verse for the sake of conciseness in the structure, relying upon the answer. Thus, the verse serves as an answer to two matters that were inquired about. The limitation in clarifying the nature of the expenditure to a general statement, without detailed exposition—as was done for the recipients—is to indicate that the latter is more important.
Does this remove the verse from being classified under the "style of the Wise"? There are two opinions, the most famous of which is the negative, as the answer was provided for the omitted matter explicitly or for the mentioned matter consequentially. Most scholars hold that this verse concerns voluntary charity (tatawwu’), though it is said it refers to Zakat. Those who permit giving Zakat to parents have used this as evidence; however, the generality of "good" (khayr) conflicts with it being Zakat, for the obligatory Zakat has specific, fixed amounts by consensus, and the Exalted did not mention the captives (riqab), either because of the sufficiency of what was mentioned in other places, or because they are included under the generality of His saying: "And whatever you do of good," for it includes every "good" performed in any place of expenditure.
"Whatever" (ma) is conditional and the object of "you do," and the action is broader than mere spending. He utilized the term that encompasses everything to emphasize the specific matter addressed in the answer.
"...For Allah is All-Knowing of it."
He knows its essence, as indicated by the form fa‘il (the intensive agent) combined with the nominal sentence that provides emphasis. The clause is the response to the conditional, considering its implied meaning, as the intent is the fulfillment of the reward. It is also said that it is evidence for the response, not the response itself.
The connection of this verse to the preceding one is that patience in spending and the sacrificing of wealth is among the greatest adornments of the believer, and it is among the strongest causes leading to Paradise, to the extent that it has been narrated: "Charity extinguishes the anger of the Lord."