Sean E. Lake's answer is excellent, and should be the accepted answer. I just wanted to provide an alternative way of seeing the same thing.
Thermal equilibrium
When particles interact, they exchange energy. This tends to bring an ensemble of interacting particles in thermal equilibrium, where each particle has the same distribution of energies, no matter the type.
CMB photons are very low-energetic. They arise from the recombination of hydrogen, and have even been redshifted since that epoch, so their energies are of the order $10^{-3}\,\mathrm{eV}$. On the other hand, the energy of cosmic rays — which probably originate in supernovae and AGN — is measured in GeV and up (the fastest cosmic ever detected had an energy of $3\times10^{20}\,\mathrm{eV}^\dagger$).
Thus, the energy of cosmic rays is much, much higher than that of the CMB, and the interaction between the two is bound, on average, to reduce the energy of the cosmics.
$^\dagger$"…which meant it packed the kinetic energy of a baseball — in a single proton" (Randall Munroe, 2012).