This word is also used in Exodus 2:24 and Exodus 6:5, in the context of the exodus. The author here could be pointing to the faithful character of God, who delivered Israel from her groaning in Egypt, and who may therefore deliver his people once again from her groaning in the days of the judges.
Groaning is hardly a way of earning your salvation! God sends the salvation simply because the people’s hearts are breaking, and because he cares about that. Despite their unfaithfulness to him, he saves them.
1
18 Whenever the LORD raised up judges for them, the LORD was with the judge, and he saved them from the hand of their enemies all the days of the judge. For the LORD was moved to pity by their groaning because of those who afflicted and oppressed them.