They're all trying to move up one shell size, so they position themselves as close to the shell they want as possible. If they weren't in order, the chance they'd end up shell-less increases dramatically
I saw a post a few weeks back about a guy who found replacement shells for hermit crabs that had adopted bottle caps and other plastic trash. Truly superheroic!