Symmetries and causes of the coincidence of the emission spectra of mirrors and charges in 1+1 and 3+1 spaces