Lord sometimes comes to the material world as an incarnation in order to manifest His fighting spirit.
The Lord stated that the punishment inflicted by the sages upon the doorkeepers Jaya and Vijaya was conceived by the Lord Himself. Without the Lord’s sanction, nothing can happen. It is to be understood that there was a plan in the cursing of the Lord’s devotees in Vaikuntha, and His plan is explained by many stalwart authorities. The Lord sometimes desires to fight. The fighting spirit also exists in the Supreme Lord, otherwise how could fighting be manifested at all? Because the Lord is the source of everything, anger and fighting are also inherent in His personality. When He desires to fight with someone, He has to find an enemy, but in the Vaikuntha world there is no enemy because everyone is engaged fully in His service. Therefore He sometimes comes to the material world as an incarnation in order to manifest His fighting spirit.
In Bhagavad-gita (4.8) also it is said that the Lord appears just to give protection to the devotees and to annihilate the nondevotees. The nondevotees are found in the material world, not in the spiritual world; therefore, when the Lord wants to fight, He has to come to this world. But who will fight with the Supreme Lord? No one is able to fight with Him! Therefore, because the Lord’s pastimes in the material world are always performed with His associates, not with others, He has to find some devotee who will play the part of an enemy. In Bhagavad-gita the Lord says to Arjuna, “My dear Arjuna, both you and I have appeared many, many times in this material world, but you have forgotten, whereas I remember.” Thus Jaya and Vijaya were selected by the Lord to fight with Him in the material world, and that was the reason the sages came to see Him and accidentally the doorkeepers were cursed. It was the Lord’s desire to send them to the material world, not perpetually, but for some time. Therefore, just as on a theatrical stage someone takes the part of enemy to the proprietor of the stage, although the play is for a short time and there is no permanent enmity between the servant and the proprietor, so the sura janas (devotees) were cursed by the sages to go to the asura jana, or atheistic families. That a devotee should come into an atheistic family is surprising, but it is simply a show. After finishing their mock fighting, both the devotee and the Lord are again associated in the spiritual planets. That is very explicitly explained here. The conclusion is that no one falls from the spiritual world, or Vaikuntha planet, for it is the eternal abode. But sometimes, as the Lord desires, devotees come into this material world as preachers or as atheists. In each case we must understand that there is a plan of the Lord. Lord Buddha, for example, was an incarnation, yet he preached atheism: “There is no God.” But actually there was a plan behind this, as explained in the Bhagavatam.
Source: A.C. Bhaktivedanta Swami Prabhupada (2014 edition), “Srimad Bhagavatam”, Third Canto, Chapter 16 – Text 26