I think a lot of the disagreement which occurs surrounding any debate about the necessity of, and, perhaps, role of evil gods comes from a lack of a shared lexicon for what exactly a "God" is.
In my view, it's perfectly valid to say "for each setting, there may or may not be a justification", which is pretty much the case for most things in D&D cosmology.
If I had to think of the role which traditionally evil Gods play in established D&D settings, I might argue that many of the "evil" Gods are just stern gods, and that, perhaps, many of them are only viewed as evil due to their alien nature or strict customs. It could also be argued that evil Gods serve much the same role Titans did in Greek mythology, or maybe the role the Devil plays in Christian folklore. Worshipers of evil Gods could be, as they are in the case of Baal, shunned and cult-like, leading me to think that these evil Gods are probably the bedtime stories of kids across the Multiverse. If you go against your parents, servants of Baal will snatch you up in the night.
King fell ill? Blame those heathen Baal worshipers, accuse the townsfolk of conspiring to summon a demon.