Nature of high-Z impurity accumulation in tokamaks