Because of this, many of the believers - if one of them were to be beaten or forced to break his fast during a day in Ramadhaan without a valid excuse, he would not break his fast. So this is from the greatest and most profound aspects of wisdom behind fasting.
And from the wisdom behind fasting is that it is a means of attaining Taqwaa, as Allaah says:
“O you who believe! Fasting is prescribed for you as it was prescribed for those before you, that you may gain Taqwaa.” [Soorah al-Baqarah (2):185]
This is since a person who is fasting is commanded to do the obligatory duties and to avoid sinful acts. The Prophet (صلى الله علیه وسلم) said:
“Whoever does not abandon false speech, acting upon that (false speech) and (acts of) ignorance (i.e. sins), then Allaah has no need of him abandoning his food and drink.” 
So when a person is fasting, every time he desires to do a sinful act, he will remember that he is fasting and thus withhold himself from that. This is why the Prophet (صلى الله علیه وسلم) ordered the person who is fasting, when cursed at and abused, to say: “I am fasting” cautioning him (the reviler) that a person fasting is commanded to refrain from cursing and reviling and reminding himself that he is fasting and cannot counter with cursing.
And from the wisdom behind fasting is that the heart opens to contemplation and remembrance (of Allaah). This is since fulfilling one’s desires leads to heedlessness and perhaps the heart becomes hardened and blinded from the truth. This is why the Prophet (صلى الله علیه وسلم) advised us to eat and drink little, where he (صلى الله علیه وسلم) said:
“The Son of Aadam does not fill a vessel worse than his stomach.” 
And in Saheeh Muslim, Handhala Al-Usaidee (رضي الله عنه), who was one of the scribes of Allaah’s Messenger (صلى الله علیه وسلم), said to the Prophet (صلى الله علیه وسلم):
“Handhala has become a hypocrite.” So Allaah’s Messenger (صلى الله علیه وسلم) said: “Why is that?” He said: “O Messenger of Allaah, when we are with you, you remind us of the Hellfire and Paradise, as if we see them with our own eyes. But when we depart from you, we meet our wives and our children and our homes and we forget much (of what we heard from you).” In the last part of the hadeeth, the Prophet (صلى الله علیه وسلم) said to him: “But O Handhala, there is a time for this and a time for that (three times).” 
Abu Sulaymaan Ad-Daraanee said:
“Indeed, when the soul hungers and thirsts, the heart softens and becomes pure. And when it is fed, the heart becomes blinded.”
And from the wisdom behind fasting is that the person who has wealth is caused to realize the blessing of wealth that Allaah has bestowed on him, such that Allaah blessed him with food, drink and sexual intercourse. Many people are deprived of these things, so he should praise Allaah for these blessings and thank Him for granting him them. And he should remember his brother who is poor and who probably goes through the day starved and hungry. So he should be generous to him and give him charity so that he can clothe his nudity and satisfy his hunger.
And from the wisdom behind fasting is that it trains one to curb the soul, and it gives one strength to withhold his soul by its bridle, such that one can govern it and lead it towards that which is good for it and what will make it prosper. This is because the soul commands one to do evil, except for those souls that my Lord has mercy on. So when a person undoes and lets go of his (soul’s) bridle, the soul lands him into many dangers. But when he controls it and curbs it, he is able to lead it to the highest of levels and the greatest of goals.
And from the wisdom of fasting is that the soul is broken down and restricted from having pride, to the point that it humbles itself to the truth and softens itself before the creation. This is because eating, drinking and having sexual intercourse with women - all of these things bring about insolence, arrogance, vanity and pride over people and over the truth. The soul preoccupies itself with trying to obtain these things because of its need for them. So when it obtains these things, the soul feels like it has conquered what it desired and so it falls into the happiness and proudness that is condemned. And this is a cause for its destruction. Only those whom Allaah protects are saved from this.
And from the wisdom behind fasting is that the passageways of blood (in the body) become narrow due to hunger and thirst, so therefore the passageways of the Devil in the human body also become narrower. This is since the Devil flows through the son of Adam like the flowing of blood, as is authentically recorded in the two Saheeh collections. So by fasting, the whisperings of the Devil are subdued and the strength of one’s desires and anger are subjugated. This is why the Prophet (صلى الله علیه وسلم) said:
“O young men! Whoever amongst you can afford it, should get married, for it is the best means for lowering one’s gaze and the best way of keeping (one’s) private parts chaste. But whoever is not able to marry, then let him fast, for it has protection.” 
And from the wisdom behind fasting are the health benefits that come as a result of it, which are attained by in-taking little food, allowing the digestive system to rest for a specified time, which lets excess wastes and excrements that are harmful to the body be discharged.
So how great and profound is the wisdom of Allaah, and how beneficial are His commandments to His creatures!
O Allaah, give us comprehension of Your Religion and allow us to understand the inner secrets of Your commandments. Rectify for us the affairs of our Religion and our worldly life. And forgive us and our parents and all the Muslims, by Your mercy, O Most Merciful. And may the peace and blessings of Allaah be on Muhammad (صلى الله علیه وسلم) and on his family and all his Companions.
 Reported by al-Bukhaaree.
 Reported by Ahmad, An-Nasaa’ee and Ibn Maajah.
 Reported by Muslim.
 Reported by al-Bukhaaree (vol. 6, pg.117) and Muslim (vol. 10, pg.172).