What is the endogenous purpose of CRISPR?

CRISPR and its accompanying CRISPR-associated system (Cas) proteins are designed to prevent the integration of foreign DNA into the host cell genome. Cas proteins recognize and cleave pieces of foreign DNA for incorporation into spacers at CRISPR loci (adaptation phase). Upon subsequent re-infection, the CRISPR loci containing the foreign DNA spacers is transcribed, creating a long precursor CRISPR RNA (pre-crRNA) which is processed into a mature crRNA by Cas proteins (expression phase). This crRNA and Cas proteins then operate in tandem to recognize and destroy matching foreign DNA (interference phase).1,2

For multi-celled organisms, genomic alterations are usually a minor inconvenience – the offending cell is removed and replaced. However, single-celled organisms obviously cannot do this, and genomic alterations can result in organism death or dramatic functional alterations and an inability to thrive. The CRISPR/Cas system is particularly designed to ward off viruses, which attempt to hijack endogenous DNA transcription mechanisms for their own purposes.

References:
1. D. Rath, et al., “The CRISPR-Cas immune system: biology, mechanisms and applications,” Biochimie 117:119-128, 2015.
2. K.S Makarova, et al., “Evolution and classification of the CRISPR-Cas systems,” Nat Rev Microbiol 9(6): 467-477, 2011.