I guess it depends probably on whether the DM considers 'god' to be a title or a creature type?Wouldn't / Couldn't these powerful demons and devils that gain the ability to grant spells to worshippers become de facto gods themselves? And once they become gods, they are no longer just a demon or devil. I mean human gods are not just powerful humans or even powerful angels- they are something more. I can see Orcus being more like the other gods than a demon anymore.
Myself, I've always considered it the former. And the way I've looked at it goes along with how the gods are portrayed in Mythic Odysseys of Theros... where it comes down to worshippers and its their belief and faith is what generates the power to ascend a being to that status.
In 4E Asmodeus is both the lord of the Archdevils and is one of the gods of the Dawn War pantheon because he has the amount of believers necessary to make him such. Likewise it seems to be how normal humans ascend to divinity in places like the Realms, when their status and renown reaches a point where they gain followers and worshippers. At some point, if enough people treat you like a god, then you are one. Basically the same premise of the Pharaohs in Ancient Egypt, yes? "Living gods" and all that?
So with that in mind... from a world-building perspective it could basically comes down to the equitable balance between mortals and divine beings. Divine beings need worshippers because their faith generates the power necessary for the being to ascend to godhood and become all-powerful / immortal... and mortals are granted power and stability from their gods in order to help facilitate their faith and belief. It's a two-way street-- faith creates divine power and divine power generates faith. And as soon as either side stop in the transaction, the divine being loses their power and falls down the ranks.