Both of those created personality cults in which they were worshipped and feared.
Its not that religion on its own leads to evil (although it does lead to ignorance and judgmental behaviour). Its that it provides a very easy means of control which allows evil people to commit evil acts and have their population believe it is necessary. Its all about control. Take away religion, and you take away a means of control.
Like that one quote goes: "With or without religion, good people will do good things and evil people will do evil things. But for good people to do evil things, that takes religion."
And its patently obvious. I know many atheists - none of them are evil. I also know religious people - none of them are evil either. But with control such as religion provides, its very easy to get good people to do evil things. They dont even realize its evil. Christians killing abortion doctors - they dont see it as evil, they see it as necessary. They justify murder in the name of religion.