In Treta Yug Lord Rama the seventh incarnation of Lord Vishnu killed demon Ravan who had abducted Rama's wife Sita. Rama, his brother Laxman and Hanuman and army of monkeys fought great battle and rescued Sita on this day. This festival is celebrated to commemorates Lord Rama's victory over Ravan. This ritual is also celebrated to get rid of ten bad qualities represented by ten heads of Ravan. These bad qualities are Kama (Lust), Krodh (Anger),Moha (Delusion), Lobh (Greed), Mada (Over Pride), Matsara (Jealousy), Ahankara (ego) etc.
In Dwapar Yug, the Pandavas lost their everything in dice game with Kauravas and had been sent to exile to the forest followed by Agnyatvas. They hid their weapons in a hole in Shami Tree. On this day they recovered their weapons and demonstrated their true identities. So Shami tree and weapons are worshipped