Muhammad learned a lot from Jews, Christians and Pagans about their religions and and rituals. He migrated to Medina for security and travelled to Syria for business. During that time he got many opportunities to meet people who believed in monotheism. Except 72 virgins part, almost everything of Islam, from Genesis to circumcision, was stolen from other religions and rituals.
Jews lived in Medina. Most probably Muhammad liked the way Jews celebrated their Yom Kippur or Rosh Hashanah. He wanted to create something for his followers so they would not feel that they were deprived of fun and recreation. Anas bin Malik says, ‘When the Prophet arrived in Medina, he found people celebrating two specific days in which they used to entertain themselves with recreation and merriment. He asked them about the nature of these festivities at which they replied that these days were occasions of fun and recreation. At this, the Prophet remarked that the Almighty has fixed two days [of festivity] instead of these for you which are better than these: Eid al-fitr and Eid al-adha.’ (From Tirmidhi Hadith)
Muhammad celebrated the first Eid in 624 with his friends and followers just after the victory at the battle of Ghazwa -e-Badar. Not many people celebrated Eid when Muhammad was alive. Two billion people, followers of an illiterate shepherd-cum-camel driver-cum-war monger-cum-creator of a religion, now celebrate Eid in the Twenty-First Century! The world looks big but it is actually a small world filled with a bunch of superstitious tribes and clans.