Wavelength selection in reaction--diffusion systems can be understood as a coarsening process that is interrupted by counteracting processes at certain wavelengths. We first show that coarsening in mass-conserving systems is driven by self-amplifying mass transport between neighboring high-density domains. We derive a general coarsening criterion and show that coarsening is generically uninterrupted in two-component systems that conserve mass. The theory is then generalized to study interrupted coarsening and anti-coarsening due to weakly-broken mass conservation, providing a general path to analyze wavelength selection in pattern formation far from equilibrium.