We describe an ab initio disordered local moment theory for materials with quenched static compositional disorder traversing first-order magnetic phase transitions. It accounts quantitatively for metamagnetic changes and the magnetocaloric effect. For perfect stoichiometric B2-ordered FeRh, we calculate the transition temperature of the ferromagnetic-antiferromagnetic transition to be Tt= 495 K and a maximum isothermal entropy change in 2 T of |ΔS|=21.1 J K-1 kg-1. A large (40%) component of |ΔS| is electronic. The transition results from a fine balance of competing electronic effects which is disturbed by small compositional changes; e.g., swapping just 2% Fe of ‘defects’ onto the Rh sublattice makes Tt drop by 290 K. This hypersensitivity explains the narrow compositional range of the transition and impurity doping effects.