Persons who worship Lord Viṣṇu are called demigods, and persons who do not do so are called asuras, or demons. Viṣṇu always takes the part of the demigods, but Brahmā and Śiva sometimes take the side of the demons; it is not that they become one in interest with them, but sometimes they do something in order to gain control over the demons.
Reference : – SB 3.5.43