Feces excreted by animals can breed pathogens and transmit disease. Important human diseases such as hookworm are transmitted through contact with feces and can be prevented by sanitation measures. Contact with fecal material is not universally detrimental. Some insects do not appear to be harmed by their fecal material, but incorporate into their biology.
The European Earwig, Forficula auricularia, builds nests to raise its young. The walls of the nest are lined with earwig feces….
Source: Living With Insects Blog