As hermit crabs grow, they require larger shells. Since suitable intact gastropod shells are sometimes a limited resource, vigorous competition often occurs among hermit crabs for shells. The availability of empty shells at any given place depends on the relative abundance of gastropods and hermit crabs, matched for size. An equally important issue is the population of organisms that prey upon gastropods and leave the shells intact. Hermit crabs kept together may fight or kill a competitor to gain access to the shell they favour. However, if the crabs vary significantly in size, the occurrence of fights over empty shells will decrease or remain nonexistent. Hermit crabs with too-small shells cannot grow as fast as those with well-fitting shells, and are more likely to be eaten if they cannot retract completely into the shell.
Hermit crab coloring page, The last benefit I would like to discuss, actually consists of two advantages.