What laws are those, the laws of ancient religions such as Judaism? Those laws do not apply to present day society. They have been superseded by laws from a newer religion. Following those laws would eliminate evil from the world.
What are those religious doctrines and teachings that allow evil to still exist?
What teachings of religion are flawed that result in evil acts?
The blame is squarely on humans because humans have free will and humans changed the older scriptures and misinterpreted them. Maybe slavery had a purpose 4000 years ago, but now we judge it as wrong because we are living in a completely different world, a new age. The problem is that people cling to older religions that were not revealed for the present day and they try to apply their religions to the present day. That just won’t work. Religion, like science, has to evolve over time in order to be useful to humanity.
Certain religious laws such as the Ten Commandments will always be applicable to everyone, other than keeping the Sabbath Day, which does not apply to everyone, only Jews. However, the specifics of religious laws need to be updated in every age in order to keep pace with the times.