That's the question Sarah Sentilles explores in her review of the movie based on the popular novel:
The plot revolves around a missing girl and the serial killer believed to have murdered her who uses the Bible like a handbook. He takes passages from Leviticus—21:9 for example: The daughter of any priest, if she profanes herself by playing the harlot, she profanes her father. She shall be burned with fire—and enacts them on women’s bodies. On Jewish women’s bodies....
Passages like these should render biblical literalism impossible. Their existence illuminates that literalists always engage in selective literalism, choosing the passages that support the arguments they want to make. And what is the rubric for selective literalism other than convenience and the maintenance of oppressive power relationships? When faced with such verses—or even passages about keeping kosher or not being around women who are menstruating—many a literalist will argue something like “that was then and this is now,” while in the very next breath (I’m talking to you, Rick Santorum, and you, Michele Bachmann) they’ll insist that homosexuality is an abomination or that women should submit to their husbands. Why? Because it’s in the Bible.
I sympathize with Sentilles' views, but I think she is confused about the meaning of biblical literalism. The Bible is a collection of many different books and literary genres. The gospels, for example, are biographies of Jesus' life that purport to describe historical facts. The book of Psalms, on the other hand, is a collection of 150 religiously-themed poems.
Knowing the genre of the text you are reading is critical to interpreting it. When, for example, the Psalmist says to God, "you knit me together in my mother's womb" (139:13), we are free to read that metaphorically because we know Psalms is a book a poetry and not, for example, a medical textbook that purports to describe how fetuses develop in utero.
We have no such freedom when it comes to passages like Leviticus 21:9. The ancient Israelites believed - rightly or wrongly - that the daughters of priests who engaged in fornication deserved special punishment because of their relatively prominent position in society. The Israelite legal code, parts of which are recorded in the book of Leviticus, reflects this belief. And when it says those who violate this precept should be burned to death, it means that literally. Perpetrators are burned to death. In the same way, when a modern criminal statute says that a person who is found guilty of violating it shall be sentenced to between 1 year and 5 years of imprisonment, it means precisely that. A sentence of 2 days - or 20 years - is not permitted
It's all very cold and calculating, and there's nothing metaphorical about it. Indeed, Sentilles' attempt to read passages like Leviticus 21:9 in a non-literal manner will not only do nothing to alleviate the suffering those passages have caused over the centuries. It may cause those of us who do accept the authority of Scripture to downplay and perhaps even forget the very real harm the Bible is capable of causing (especially in the wrong hands).
Which is why I suspect what Sentilles really means is that we should acknowledge the inherent brutality of these parts of Jewish law and question whether God actually authored them. If so, that's a project no less an authority than Jesus wholeheartedly endorsed. Like the prophets before him, he had strong words to say against those who "teach[] for doctrines the commandments of men" (Matthew 15:9). He did not hesitate to denounce certain aspects of Jewish law for containing errors that violate the will of God (Mark 10:5). He publicly flouted the laws against working on the Sabbath, famously observing that God made the day of rest for the benefit of man and not the other way around (Mark 2:27). And when a crowd had gathered to stone a woman to death for committing adultery - a punishment required by Jewish law - he invited those who had not sinned to cast the first stone. When no one did so, he told the woman, "Neither do I condemn thee: go, and sin no more" (John 8:11).
The only possible conclusion to draw is that Jesus did not consider Jewish law to be an accurate guide to the will of God. And if he didn't, we need not do so either.