Although many binary compounds have the B2 (CsCl-type) structure in the thermodynamic phase diagram, an origin of the structural stability is not understood well. Here, we focus on 416 compounds in the B2 structure extracted from the Materials Project, and study the dynamical stability of those compounds from first principles. We demonstrate that the B2 phase stability lies in whether the lowest frequency phonon at the M point in the Brillouin zone is endowed with a positive frequency. We show that the interatomic interactions up to the fourth nearest neighbor atoms are necessary for stabilizing such phonon modes, which should determine the minimum cutoff radius for constructing the interatomic potentials of binary compounds with guaranteed accuracy.