While studying their fossils, paleontologists noticed that many trilobite lineages evolved elaborate spines on their exoskeletons. At first, scientists hypothesized that these spines provided stability in the water — but further study suggested that most trilobites were too big for the spines to have been helpful in this way.
That observation led to a second working hypothesis, that trilobites evolved spiny exoskeletons for defense, much as porcupines use their spines for defense. This idea is supported by another piece of data, that predatory fish started to become common at about the same time. Many trilobites also evolved modified exoskeletons that would let them roll up into an armored ball, as pill bugs do today.
These evolutionary changes are clues suggesting that the exoskeleton played an important role in the success and survival of the trilobites.