I think Mud is ultimately a bildungsroman. It tells the story of Ellis coming of age, and deals with themes of the loss of innocence, and the contrast between idealized childhood fantasy vs. the dark reality of the real world.
Mud and Ellis are paralleled in the sense that Mud is an idealist who has never given up on his fantasy of a perfect life with his girlfriend, despite the reality of the situation, and Ellis is an innocent who is dealing with the breakup of his parents and the loss of his family home by the river. Ironically, while Mud captures this sense of childhood innocence with his idealism, Mud is anything but innocent as he is revealed to be a hotheaded and violent man who has killed for his idealistic love. Nonetheless, Mud remains a good man who acts on his romanticism, emotions and impulse.
Consider the scene at the very end, when the mobster Dad realizes that he’s lost yet another son in his pursuit of Mud for vengeance. The “bad guys” aren’t really as much “bad guys” as they are people. Although Ellis remains innocent, almost all the adult characters have real personal problems, of which they are partly responsible, to deal with: his parents’ separation, King Carver’s campaign of revenge for his slain son, Mud’s unhealthy relationship with Juniper, Juniper’s unhealthy relationship with Mud, Tom Blankenship’s disappointment in Mud’s inability to change the course of his life, etc.
The whole motivation for Ellis in helping Mud is because he sees that hopeful idealism in Mud, he sees that Mud is a good guy even if Mud finds himself on a “fallen path”. Mud, by saving Ellis, redeems himself (even if in so doing reveals himself and therefore is forced to flee thereby permanently removing Juniper from his life), and Ellis, in meeting and helping Mud, grows up to become a man. They’re both chivalrous, they’re both hopeless romantics who want to believe that there’s more than life offers them: this is apparent in Mud’s unrequited, near obsessive love of Juniper and in Ellis believing that May Pearl is his girlfriend just because she gave him a bit of affection. Most tellingly though is how Ellis reacts to May Pearl’s snubbing: with violence. Exactly like Mud.
Basically what I’m saying is Mud is a future Ellis who fucked up. Their relationship allows Mud to get a new start, and to fix the mistakes he made in the past, while at the same time Ellis learns and grows to be a better man through his brief interaction with Mud.