New research has found that looking different actually does serve a purpose in certain creatures. The study looked specifically at the Hawaiian Happy-face Spider (Theridion grallator), whose appearance ranges from solid yellow to a variety of different red, black, or white marks. Interestingly, all of these marks are inherited, so the variation is not simply random for each individual spider.
The study found that the reason for these wild variations stems from a common driving force of evolution: predators. By looking different, the spiders are able to take advantage of “dietary wariness” in predators. To avoid consuming potentially poisonous meals, predators are naturally hesitant about eating anything that looks different from their normal meals and about incorporating novel food items into a regular diet. If the main predators of the happy-face spider exhibit even a modest level of “dietary wariness”, then, it would make sense for them to evolve into a variety of different visible forms as a way of avoiding predation.
You can read the full study in the journal Evolution.