يَـٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوا۟ كُتِبَ عَلَيْكُمُ ٱلصِّيَامُ كَمَا كُتِبَ عَلَى ٱلَّذِينَ مِن قَبْلِكُمْ لَعَلَّكُمْ تَتَّقُونَ
O you who believe! fasting is prescribed for you, as it was prescribed for those before you, so that you may guard (against evil). TMQ [2:183]
Allah (SWT) states that fasting has been prescribed upon us like it was prescribed upon those before us (The People of the Book). The phrase – كَمَا كُتِبَ عَلَى ٱلَّذِينَ مِن قَبْلِكُمْ, as it was prescribed for those before you – as a simile تَشْبِيهٌ where the angle of comparison (وجْهُ الشَّبَهِ) has not been mentioned explicitly in verse.
Shaikh Muhammed Ibn Ashoor (ra) mentions few compelling reasons for comparing our fasting with those before us when Allah (SWT) says: كَما كُتِبَ عَلى الَّذِينَ مِن قَبْلِكُمْ – as it was prescribed for those before you.
Although our fasting and the detailed of the ritual are different from those who fast from the people of the Book, however, he mentions the following wisdom for the comparison (تَشْبِيهٌ).
1 . To highlight the importance of this act of worship because Allah (SWT) legislated this act of worship previously to the Jews and Christians. This comparison indicates the continuity of its performance and the abundance of its reward. Thus, motivate the Muslims to fulfil this command and also those who were previously prescribed by this duty are not the ones only ones distinguished by it. The Muslims used to compete in worship as mentioned in the hadith of the Prophet (as).
On the authority of Abu Dharr (may Allah be pleased with him):
عَنْ أَبِي ذَرٍّ رَضِيَ اللهُ عَنْهُ أَيْضًا، “أَنَّ نَاسًا مِنْ أَصْحَابِ رَسُولِ اللَّهِ صلى الله عليه و سلم قَالُوا لِلنَّبِيِّ صلى الله عليه و سلم يَا رَسُولَ اللَّهِ ذَهَبَ أَهْلُ الدُّثُورِ بِالْأُجُورِ؛ يُصَلُّونَ كَمَا نُصَلِّي، وَيَصُومُونَ كَمَا نَصُومُ، وَيَتَصَدَّقُونَ بِفُضُولِ أَمْوَالِهِمْ. قَالَ: أَوَلَيْسَ قَدْ جَعَلَ اللَّهُ لَكُمْ مَا تَصَّدَّقُونَ؟ إنَّ بِكُلِّ تَسْبِيحَةٍ صَدَقَةً، وَكُلِّ تَكْبِيرَةٍ صَدَقَةً، وَكُلِّ تَحْمِيدَةٍ صَدَقَةً، وَكُلِّ تَهْلِيلَةٍ صَدَقَةً، وَأَمْرٌ بِمَعْرُوفٍ صَدَقَةٌ، وَنَهْيٌ عَنْ مُنْكَرٍ صَدَقَةٌ، وَفِي بُضْعِ أَحَدِكُمْ صَدَقَةٌ. قَالُوا: يَا رَسُولَ اللَّهِ أَيَأْتِي أَحَدُنَا شَهْوَتَهُ وَيَكُونُ لَهُ فِيهَا أَجْرٌ؟ قَالَ: أَرَأَيْتُمْ لَوْ وَضَعَهَا فِي حَرَامٍ أَكَانَ عَلَيْهِ وِزْرٌ؟ فَكَذَلِكَ إذَا وَضَعَهَا فِي الْحَلَالِ، كَانَ لَهُ أَجْرٌ”.
Some people from amongst the Companions of the Messenger of Allah (peace and blessings of Allah be upon him) said to the Prophet (peace and blessings of Allah be upon him), “O Messenger of Allah, the affluent have made off with the rewards; they pray as we pray, they fast as we fast, and they give [much] in charity by virtue of their wealth.” He (peace and blessings of Allah be upon him) said, “Has not Allah made things for you to give in charity? Truly every tasbeehah [saying: ‘subhan-Allah’] is a charity, and every takbeerah [saying: ‘Allahu akbar’] is a charity, and every tahmeedah [saying: ‘al-hamdu lillah’] is a charity, and every tahleelah [saying: ‘laa ilaha illAllah’] is a charity. And commanding the good is a charity, and forbidding an evil is a charity, and in the bud`i [sexual act] of each one of you there is a charity.” They said, “O Messenger of Allah, when one of us fulfils his carnal desire will he have some reward for that?” He (peace and blessings of Allah be upon him) said, “Do you not see that if he were to act upon it [his desire] in an unlawful manner then he would be deserving of punishment? Likewise, if he were to act upon it in a lawful manner then he will be deserving of a reward.” [Muslim]
Also, the first Arab Muslims wanted to excel over the people of the Book and wanted to stop their boasting because they were the people of Sharia while the Arabs had no Sharia previously.
Allah (SWT) says:
أَن تَقُولُوٓا۟ إِنَّمَآ أُنزِلَ ٱلْكِتَـٰبُ عَلَىٰ طَآئِفَتَيْنِ مِن قَبْلِنَا وَإِن كُنَّا عَن دِرَاسَتِهِمْ لَغَـٰفِلِينَ
Lest you say that the Book was only revealed to two parties before us and We were truly unaware of what they read. [6:156]
أَوْ تَقُولُوا۟ لَوْ أَنَّآ أُنزِلَ عَلَيْنَا ٱلْكِتَـٰبُ لَكُنَّآ أَهْدَىٰ مِنْهُمْ ۚ فَقَدْ جَآءَكُم بَيِّنَةٌ مِّن رَّبِّكُمْ وَهُدًى وَرَحْمَةٌ ۚ
Or lest you should say: If the Book had been revealed to us, we would certainly have been better guided than they, so indeed there has come to you clear proof from your Lord, and guidance and mercy. [6:156]
Therefore, the first benefit of mentioning the comparison is to show the importance of the continuity of this worship and to inspire the Muslims to compete with others in good deeds.
2. Another reason for mentioning those before is to alleviate the fear and the anxiety that this worship is difficult. Mentioning any examples of those who have undertaken the difficult and challenging tasks always eases the burdens on the souls who are yet to perform it. This meaning had been emphasised in His saying that it only for a few days when He (SWT) said: أَيَّامًا مَّعْدُودَٰتٍ (For a certain number of days;).
3. Finally, to strengthen the resolve in aknowledging this duty so that we are not weak in accepting it and falling short of its completion. Instead, to take hold of this duty with more strength and determination than the previous nations.