Theoretical understanding of correlation between magnetic phase transition and the superconducting dome in high-Tc cuprates