The principal biological function of bacterial and archaeal CRISPR systems is RNA-guided adaptive immunity against viruses and other mobile genetic elements (MGEs). These systems show remarkable evolutionary plasticity and functional versatility at multiple levels, including both the defense mechanisms that lead to direct, specific elimination of the target DNA or RNA and those that cause programmed cell death (PCD) or induction of dormancy. This flexibility is also evident in the recruitment of CRISPR systems for nondefense functions. Defective CRISPR systems or individual CRISPR components have been recruited by transposons for RNA-guided transposition, by plasmids for interplasmid competition, and by viruses for antidefense and interviral conflicts. Additionally, multiple highly derived CRISPR variants of yet unknown functions have been discovered. A major route of innovation in CRISPR evolution is the repurposing of diverged repeat variants encoded outside CRISPR arrays for various structural and regulatory functions. The evolutionary plasticity and functional versatility of CRISPR systems are striking manifestations of the ubiquitous interplay between defense and "normal" cellular functions.