The thing is, people are animals. We can do good, and we can do bad. The religions we create are manifestations of that. Religion is a subset of philosophy, always has been. Philosophy as we know, covers a lot of topics, and some of it can lead to violence in an attempt to install ideologies or to maintain them.
My point? The most important context you can apply to religion is that it is all man-made. It has absolutely no supernatural element to it besides the imagination of man. But if we bring up this context, we get met with hostility from religious people. They want to default to an excuse of "human behavior" in order to exclude religious influence in their actions when those actions happen to be immoral, and default to a position of supernatural when it happens to be good.
Also, a lot of these texts are absolutely explicit in this man-made created god advocating genocide and violence, including the murder of children. Again, if we apply the context that is was written by men, it becomes very clear why this god advocates such things. But that's not what is happening is it? We are told to ignore the bad and hold that same version of god in high esteem. Then we condemn certain people for being bad representatives of the faith when they take those certain parts to heart.
Trying to have it both ways in the argument is dishonest, isn't it?