As a writer, you should try to give your villains plausible motivations, backstories, etc. A villain is much more interesting if they think they’re the hero of their own story.
As a DM, this is still great advice in theory but in practice you should ABSOLUTELY NEVER DO THIS because your players will discover your villains’ tragic backstory, look at their motivation and find it sound, and end up adopting the villains, going rogue from the Celestial Intervention Agency to avenge the wrongs done said villains and ensure their freedom, accidentally kidnapping the President, and plunging Gallifrey into a civil war.
For me, also known as “hey Spoon, why are there two Pantheon wipes in your D&D setting?”
… because my players sided with the sympathetic villain who just wanted to stop the exploitation of their people… by eliminating the gods themselves, even the ones who had nothing to do with it.