This story is twisty and full of interesting chance events, because life is largely that way. There is a complicated web of meaning in the stories because each of the characters is complex, somehow both sublime and deeply human, which gives the story its legendary quality. Overall, the thematic implication of the story is that although one's heroism doesn't save them from tragedy or betrayal, it always saves them from dishonor. Sigurd is a hero whose victory over the Niblungs literally comes as a consequence of his legacy.
Through her schemes, Gudrum manages to steal Sigurd for himself, but she loses him as a consequence. Then her real punishment begins; having finally experienced love from an honorable man, she can no longer find someone who will help her move on from his death. She undermines her own safety and wealth in the process of trying to change Atli into an honorable man, but this leads to the violent murder of her brothers, and Atli has an orgy in victory. Her attempts to make a dishonorable man be honorable have failed, and she realizes that she was defeated before she began.
The justice that is happening throughout the story is complex, addressing each character's situation differently. Each character who takes something from someone gets what's coming to them in the end, but surprisingly, even the good characters receive the same reward: death. In light of the finality of death, the characters who do better in life are those whose legacies are good and long-lasting.