According to the Hanafi Madhab Eid prayer is Wajib. Wajib is almost the same as Fard. Therefore, one is obliged to pray Eid.
عَنْ أَبِي سَعِيدٍ الخُدْرِيِّ، قَالَ: «كَانَ رَسُولُ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ يَخْرُجُ يَوْمَ الفِطْرِ وَالأَضْحَى إِلَى المُصَلَّى، فَأَوَّلُ شَيْءٍ يَبْدَأُ بِهِ الصَّلاَةُ، ثُمَّ يَنْصَرِفُ، فَيَقُومُ مُقَابِلَ النَّاسِ، وَالنَّاسُ جُلُوسٌ عَلَى صُفُوفِهِمْ فَيَعِظُهُمْ، وَيُوصِيهِمْ، وَيَأْمُرُهُمْ
Abu Saeed al-Khudri (May Allah Most High be pleased with him) said, ‘The Messenger of Allah ﷺ used to proceed to the Musalla (place of prayer) on the days of Eid al-Fitr and Eid al-Adha. The first thing he would begin with was the prayer. Thereafter he ﷺ would face the people, whilst they were seated in their rows. He ﷺ would teach them, advise them, and command them. (Sahih al-Bukhari, 956).
There is a difference of opinion amongst the scholars of Ahl al-Sunnah regarding the Eid prayer. Some considered it to be Sunnah (recommended) and others said Wajib. The sound opinion in the Hanafi Madhab is Wajib. As clarified by Imam Ibn Nujaym:
صَلَاةَ الْعِيدِ وَاجِبَةٌ عَلَى الْأَصَحِّ. (البحر الرائق)
Eid prayer is Wajib according to the soundest opinion. (Imam Ibn Nujaym, al-Bahr al-Raiq).
When there is a clear difference of opinion amongst the scholars of Ahl al-Sunnah, you tend to find that each group has evidence to support their position. However, none of the evidence is absolutely categorical. Otherwise there would be no room for difference of opinion and the scholars would be in agreement. This is an important point to keep in mind when one encounters valid differences of opinion within Ahl al-Sunnah.
فَصَلِّ لِرَبِّكَ وَانْحَرْ
And pray to your Lord and sacrifice. (Surah al-Kowthar,2).
The Holy verse above is amongst the proofs the Hanafi scholars provide to support the opinion that Eid Salah is Wajib. There is a command in the verse with regards to prayer and sacrifice. The default ruling is that a command necessitates obligation. Therefore, the prayer and sacrifice being referred to in the verse are both obligatory (Wajib). The sacrifice being referred to is the Adhaa sacrifice and the prayer is the Eid prayer.
And Allah Most High Knows Best.
-Answered by Shaykh Noorud-deen Rashid (30.04.2022)
Is it Makruh to pray Nafl before or after Eid prayer
Are there special sunnahs for Eid day?
Respecting difference of opinion
See also video: