Midrash is the life blood of the halakhic system. I don't think that midrash was made by the sages in order to re-enliven Judaism, I think it was part of the great body of work and was never a separate thing. Today we think of midrash as good post-modernists do, busily locating ourselves here and there in relation to our matrices of self, but the rabbis had no such self-consciousness about that. For the sages, midrash was all of a piece with Torah (in the larger sense of the word). It was true in the finest sense of truth, which is why modern midrash is often so bad - it's written as if it were a novel or a story, when it's really more like a fairy tale, written through archetypes and the power of a lack of details that comes with stories told and retold for generations with plenty of room left for us to fill in ourselves - and to fill ourselves in. Midrash is meant to tell us about values, as opposed to rules. Rules are secondary in the sense that they come afterwards. The rules express the stories told in midrash. The midrash tells us about our relationship with God, Halakha only tells us the recipe - it's as different as remembering the smell of my mother's wheatbread baking, and baking the bread from the recipe she gave me. One is my bones remembering love, and the other is how to make that love live for my son.
"it's really more like a fairy tale, written through archetypes and the power of a lack of details."
A certain Sarah shares the following thoughts on the significance of aggadah:
As a literary sort, I have my own answer as to why Aggadah is valuable: the narrative structure of a parable can compel analysis and inquiry in a way entirely different from a straight-up midrash halakhah or talmudic discussion. Humans express deep truths through narrative art, and whether or not a story really happened has very little bearing on whether it is affective or honest. The traditional project of aggadah is a way to engage in the most deeply human of projects, to insert rabbinic meaning into the canonical text and thus re-enliven it. And by our rereading of these aggadot, inventing and reenvisioning our own interpretations, may we come to engage in all these facets of the aggadic process.
"The traditional project of aggadah is ... to insert rabbinic meaning into the canonical text and thus re-enliven it."