Human the creation of Allah Almighty, Allah the most merciful has set some rules and norms while he was creating the human and ordered them to follow all those roles and norms as per wish of Allah Almighty, but when a human is overcome by a material desire and their worldly needs they become neglected by those rules and norms which have been imposed by Allah Almighty. To remind a human about their commitments which they have made with Allah Almighty before coming to this world Allah has made fasting mandatory once every year for a whole month and that month is called the holy month of Ramadan.
When Ramadan comes some restriction on our eating and marital relationship has been imposed and we are asked to do worship to Allah Almighty to forgive our sin. Fasting is somewhat demanding because its original aim is to make us disciplined and to make our selves abstain from sin and follow the way which is described by the prophet(pbuh), and to achieve this objective it is mandatory to show full commitment with Ramadan and fast during the month as described by the Prophet(pbuh).
The one example of how Ramadan teach us to make control on our needs and wants is when we are having sehri or sahor and all of sudden we hear Adhan, we immediately stop eating how so ever strong our need for a certain thing but we stop doing what we were doing and we are not allowed to eat anything during fast we do not give to our wishes and temptation, this restriction of not eating and drinking remain till Maghrib until we cannot hear adhan and this timing is also appointed by Allah.
The month of Ramadan gives us lots of knowledge and we gain lot from fasting. The most important thing which we gain from fasting is that one’s soul is liberated from the shackles of his wishes and desires and moves a step forward towards knowledge and intellect, he moves a step closer to Allah by rising all above all ordinary needs. This is the purpose why fasting puts all restriction on all those things which results increase in our desires and incline us towards pleasure, when a person restrict such constrained then he is able to break his bond with this world and come closer to the lord of the world, towards his creator this is why Allah Almighty says that fasting is for Him and He alone will bestow the reward for it.