Raman scattering has been employed to investigate lattice and magnetic excitations of the honeycomb Kitaev material $alpha$-RuCl$_3$ and its Heisenberg counterpart CrCl$_3$. Our phonon Raman spectra give evidence for a first-order structural transition from a monoclinic to a rhombohedral structure for both compounds. Significantly, only $alpha$-RuCl$_3$ features a large thermal hysteresis, consistent with the formation of a wide phase of coexistence. In the related temperature interval of $70-170$ K, we observe a hysteretic behavior of magnetic excitations as well. The stronger magnetic response in the rhombohedral compared to the monoclinic phase evidences a coupling between the crystallographic structure and low-energy magnetic response. Our results demonstrate that the Kitaev magnetism concomitant with fractionalized excitations is susceptible to small variations of bonding geometry.