Presumably, God could have written these books any way He wanted. And if He wanted them to be understood in the spirit of twenty-first-century secular rationality, He could have left out all those bits about stoning people to death for adultery or witchcraft.