Hadith: The Messenger of Allah (may Allah’s peace and blessings be upon him) ordered us to bring out the young girls and the girls who stay home on the two Eid days, and ordered the menstruating women to distance themselves from the praying area of the Muslims
عن أم عَطيَّة نُسَيْبة الأنصارية رضي الله عنها قالت: «أَمَرَنا رسول الله صلى الله عليه وسلم أن نُخْرِج في العيدين الْعَوَاتِقَ وَذَوَاتِ الْخُدُورِ، وأَمَر الحُيَّض أن يَعْتَزِلْنَ مُصلّى المسلمين».
وفي لفظ:«كنا نُؤمر أن نَخْرُجَ يوم العيد، حتى نُخْرِجَ الْبِكْرَ من خِدْرِهَا، حَتَّى تخرجَ الْحُيَّضُ، فَيُكَبِّرْنَ بتكبيرهم ويدعون بدعائهم، يرجون بَرَكَة ذلك اليوم وطُهْرَتَهُ». [صحيح] - [متفق عليه] المزيــد ...
Umm ‘Atiyyah reported: The Messenger of Allah (may Allah’s peace and blessings be upon him) ordered us to bring out the young girls and the girls who stay home on the two Eid days, and ordered the menstruating women to distance themselves from the praying area of the Muslims.
In another version of the Hadīth:"c2">“We have been ordered to come out on the Day of Eid, even bring out the virgin girls from their houses and the menstruating women; so they would say Takbīr along with them, invoke Allah along with them; hoping for the blessings of that day and its purification.” Sahih/Authentic. - [Al-Bukhari and Muslim]
The days of Eid al-Ad'ha and Eid al-Fitr are from the virtuous days of the year, on which the rituals of Islam become manifest, and Muslims brotherliness is demonstrated through their assembly and alignment on these days. Each country's people come together on a plain land manifesting their unity; solidarity and harmony; unanimously support Islam; raise the word of Allah (Islam); to establish the remembrance of Allah; and demonstrate its rituals.
That is why the Messenger (may Allah's peace and blessings be upon him) ordered all of the women, even the young girls who remain in their homes and the menstruating women, to exit with the Muslims and attend this assembly, provided that they stay away from the area of worship; to attend the great day and supplication of Muslims. They will obtain thereupon some goodness and blessing of that day, and the mercy of Allah and His pleasure.
Attending the two Eids' prayer is a communal obligation on the Muslims.