They proliferated beyond the capability of existing ecosystems to deal with them. Sandtrout encysted the available free water, made this a desert planet... and they did it to survive. In a planet sufficiently dry, they could move to their sandworm phase."