If I am not mistaken there is a caterpillar, here on Earth, that uses the same escape mechanism: it flexes on both extremities and then springs away.
The effectiveness of an escape mechanism is often not only in the capability of taking the creature away from the menace, but also in disorienting the menace itself.
And a jumping-in-the-air type of worm is surely effective at disorienting an attacker: I mean, you are there in front of this thing, watering your mouth with the idea of a good meal, and before you blink your eyes it is springing up in the air to go god knows where!
If it is not only an escape mechanism, it can also be effective in the environment: you mention dense air and low gravity, this means that winds can be more effective in transporting things. So, as the worm jumps in the air, the wind will carry it further than just another form of motion would have, with the same energy expenditure.
It can originate by perfecting a simple bipedal motion, where front and hind foot are used alternatively to move the worm: a stronger arching can result in a jump.