G’d says in the Qur’an (2:183) – Oh you who believe! Fasting has been prescribed upon you just as it has been prescribed upon those from before you in order that you grow in consciousness/regardfulness (taqwa).
جعل الله تعالى صيامه فريضة
Prophet Muhammad (SAAS) stated, “G’d, most high, made fasting in it [Ramadan] a religious obligation.”
Fasting from dawn to dusk, abstaining from food, drink, and sexual activity is obligatory during the 9th lunar month, Ramadan, upon every Muslim, who is sane, healthy, not traveling and of the age of puberty.
Prior to the community of Prophet Muhammad (SAAS), Christians were commanded to fast as a religious obligation. Fasting in fact is a natural inclination within the soul of every human to restrain from that which would normally be lawful in order to cultivate more clarity of consciousness and discipline. According to the language of the Qur’an, the yearning to fast is clocked into the essence of the human soul.
Fasting from what is normally lawful at prescribed times cultivates a mindset of greater abstinence of those actions or things that are unlawful inside and outside of Ramadan.
G’d gave the human being free will, but the natural human psyche dictates that freedom at times needs to be restricted. Total freedom without restraint would make man less than a beast.
And surely G’d knows best.