It's not all metaphorical. Some of it clearly demands obedience to the letter. I fail to see the deep metaphorical meaning in something like "If a man also lie with mankind, as he lieth with a woman, both of them have committed an abomination: they shall surely be put to death; their blood shall be upon them."