Through a process called horizontal transfer, they can jump from one organism to another, even an unrelated species. (showcase.casw.org)
Bacteria lacking them to start with can simply borrow them (via horizontal transfer of genes) from those that are better equipped. (sciencedaily.com)
Genes that arrive via horizontal transfer, however, appear randomly throughout the genome and often have radically different functions. (scientificamerican.com)