The CRISPR (clustered, regularly, interspaced, short, palindromic repeats)-Cas (CRISPR-associated genes) systems of archaea and bacteria provide adaptive immunity against viruses and other selfish elements and are believed to curtail horizontal gene transfer (HGT). Limiting acquisition of new genetic material could be one of the sources of the fitness cost of CRISPR-Cas maintenance and one of the causes of the patchy distribution of CRISPR-Cas among bacteria, and across environments. We sought to test the hypothesis that the activity of CRISPR-Cas in microbes is negatively correlated with the extent of recent HGT. Using three independent measures of HGT, we found no significant dependence between the length of CRISPR arrays, which reflects the activity of the immune system, and the estimated number of recent HGT events. In contrast, we observed a significant negative dependence between the estimated extent of HGT and growth temperature of microbes, which could be explained by the lower genetic diversity in hotter environments. We hypothesize that the relevant events in the evolution of resistance to mobile elements and proclivity for HGT, to which CRISPR-Cas systems seem to substantially contribute, occur on the population scale rather than on the timescale of species evolution.