Oppressing women and minorities is something some people apparently get off on, and often these atrocities are committed under the umbrella of religion.
Several arguments can be made whether the religion justifies it, or whether those carrying out such atrocities are properly interpreting scripture- but what is undeniable is that all holy books were written at a time of great barbarity, and thus undisputedly would contain laws of great barbarity. Ergo, when you apply them, barbarity ensues.