The trilobites may have gone extinct (along with 95% of marine species) during the mass extinction at the end of the Permian period, but that doesn’t mean that they were a failure. On the contrary, the trilobites survived for more than 250 million years (longer than the dinosaurs), and dominated seafloor ecosystems for much of this time.
Pick up a piece of rock from the Cambrian period, over 500 million years ago, and most of the fossils you’ll see are trilobites. Paleontologists imagine a seafloor literally crawling with these armored arthropods. How did they survive so long and become so diverse? Well, one of the clues seems to lie in their hard shells that fossilize so well — their exoskeletons.