Mantis shrimp shoulder their evolutionary baggage and bluff :
The baggage-laden traveler: history matters
The exoskeleton is part of the mantis shrimp's evolutionary heritage its "baggage." It is so central to the way a mantis shrimp's body is built that evolution simply cannot produce a mantis shrimp without an exoskeleton. The exoskeleton is useful in many ways, but having one also means that you have to go through the risky process of molting it's not an ideal solution to the problem of growth, but mantis shrimp must make do.
Less than ideal solutions pop up all the time in nature because evolution is not capable of planning ahead. Evolution works with whatever variation is available at the moment and in whatever environment the organism currently inhabits. Nonetheless, the imperfect solutions produced by this process are "good enough" for survival the nerve that connects the giraffe's voice box with its spinal cord travels all the way down the neck to the lower body and then goes back up again instead of making a quicker connection, mammals have an avoidable blind spot because of how the nerves are attached in their eyes, and mantis shrimp molt despite its dangers. The existence of these imperfections and historical holdovers is strong evidence that life has indeed evolved.