Hamlet is a play. Paradise Lost is a poem. The broken window is a parable. What sort of book is the Torah?
Ramban (introduction to his Peirush al Ha-Torah and Shemos 24:12) divides the contents of the Torah into three parts: the Ten Commandments (luchos ha-even); the laws (mitzvah); and the narratives (torah).
Each of these genres serve a different function. The Ten Commandments constitute the beginning of B’nai Yisrael’s conversion to become God’s chosen people. The Torah records the national history of our people, because the reader of the Torah cannot understand himself without understanding his nation.
The laws dictate God’s expectations for how we act. The narratives instruct on how to live a life of faith. But why have both law and narrative? Couldn’t God communicate his expectations of our behavior through halacha alone?
In Ramban’s view (ibid. and Beirishis 1:1), the law instructs on how to act; narratives instruct on how to live. Life is much more complicated and much too broad to be exhausted by the law. Want to know the contractual differences between a verbal and written loan? There’s a siman for that. But what about broader questions? How should a brother navigate sibling rivalry? How do you succeed after betrayal? What makes a good mother? What makes a good man?
Questions like these aren’t — can’t be — answered by the law in part because the law is too abstract, too precise, and too frozen. Life questions — rather than legal questions — are fleshy, messy, and dynamic. Only stories succeed in answering them. For instance: it is far easier to answer the question “What makes a good man?” by pointing to Avaraham’s life than it is to compose a list of qualities which make a man good.
The Torah, for Ramban, is the definitive owner’s manual for the life God gave us.