Why is fasting attributed to Allah?


The reason why Siyaam (Fasting) is attributed to Allah the Almighty is that all the acts of worship are performed apparently before other people. For instance, when someone enters into the Masjid, performs wudu' (ablution) and prays, his performance of Salah is seen by other people. Likewise,  whoever intends to travel to the Sacred House to perform Hajj or Umrah, his surroundings will hold a farewell ceremony upon his departure and a welcoming ceremony upon his arrival, and he will also be called Hajj (the pilgrim), so this act of worship is apparent to all people. Much in the same line, paying one's Zakat of his money is performed before other people. Unlike all these acts of worship, observing Siyaam (fasting) is performed in a different way, and some scholars said, "It is performed in a private way; between the  subject and his Lord. So none can know the sincerity of performing it but Allah Alone." You may claim that you are Sa'em, but only Allah knows whether you are honest or not. Accordingly, this particular act of worship is a secret between the person and his Lord, and scholars deduced this fact from Allah's following Words in the Noble Hadith:       

Abu Hurairah narrated: The Prophet (peace be upon him) said, "(Allah said), 'Every good deed of Adam's son is for him except fasting; it is for Me. and I shall reward (the fasting person) for it.'..."

[Al-Bukhari, Muslim, Abu Dawood, At-Tirmithi, An-Nasa'i & Malik]