The ground-state shape (phase) evolution in Er and Yb isotopes is manifested in the axially deformed Nilsson mean-field plus extended pairing model. The energy ratio R02+/21+, the odd-even mass differences, the ground-state occupation probabilities of valence nucleon pairs with different angular momenta and the information entropy are calculated. It is shown from these quantities as functions of the quadrupole deformation parameter and the overall pairing interaction strength that the ground-state shape (phase) evolution is mainly driven by the pairing interaction and less affected by the quadrupole deformation, which thus provides a possible origin of the ground-state shape (phase) evolution of these isotopes.