Narada, who was listening to the divine tales of Shiva with rapt attention, was very curious to know about the reasons why lord Vishnu attended a yagya where Shiva was not invited and why did he fight a battle against Veerbhadra despite knowing about his invincibility.
Lord Brahma told him that all this happened due to the curse of Sage Dadhichi-
In the ancient times, there used to live a king named Kshuva, who was a great friend of Sage Dadhichi. Due to some reasons both of their developed animosity towards each other. Dadhichi considered himself superior because of being a brahmin, on the other hand Kshuva considered himself superior on account of his wealth. The dispute took a worst turn and Dadhichi punched him on his head. As a result Kshuva felt down unconscious. When he regained his consciousness he struck sage Dadhichi with his weapon named Vajra, which injured Dadhichi.
Dadhichi sought the help of Shukracharya. Shukracharya healed his wounds by his mantras. He also taught Dadhichi the mahamrityunjay mantra. Dadhichi then did a tremendous penance to please lord Shiva. Lord Shiva appeared before him and blessed him with three boons, they were
1) his bones, would become as hard as lightning (Vajra), 2) he would not be killed, 3) he would never be humiliated.
Armed with these three boons, Sage Dadhichi again went to fight Kshuva. He kicked him, in return Kshuva too attacked him with his weapon named Vajra, but it did not have any effect on Dadhichi as his bones had become as hard as lighting.
King Kshuva did a tremendous penance to please lord Vishnu. Vishnu revealed to him that Dadhichi had become immortal because of the blessings of lord Shiva, but assured him that he would certainly help him in defeating Dadhichi.
Lord Vishnu then visited the hermitage of Sage Dadhichi, disguised as a brahmin. On being asked by Dadhichi about the purpose of his arrival, he said that he had come with a desire of a boon on his heart.
Sage Dadhichi, by his yogic power came to know about the real identity of a ‘Brahmin’. He told that he had been caught. Lord Vishnu was ashamed.
Lord Vishnu then went back to Kshuva and instructed him to go to sage Dadhichi and act as if he had accepted his superiority.
“Kshuva went to sage Dadhichi and did as he was instructed to do, but Dadhichi did not believe his words. Now lord Vishnu became angry and tried to kill him by his sudarshan chakra, but he was not successful, as the chakra, which was given to him by lord Shiva himself, was not willing to harm a devotee of Shiva.
“Lord Vishnu then tried to kill Dadhichi by shooting volley of arrows. The deities too attacked with their weapon. Sage Dadhichi threw a handful of Kusha grass, initiated with mantras towards them, which destroyed all the weapons of the deities.”
“In the meantime lord Brahma arrived on the scene accompanies by Kshuva. He told the deities that it was futile to fight with Dadhichi as he was invincible, due to the boon given by lord Shiva.”
“Ultimately King Kshuva begged his forgiveness for his offence. Dahichi forgave him but cursed Vishnu including all the deities that they would be burnt to ashes by the wrath of Rudra.” “This was the reason why all the deities and lord Vishnu attended the yagya, organised by Daksha and got defeated by Veerbhadra.”