In the name of Allah, the Compassionate the Merciful
Narrated Abu Huraira (RA): The Prophet (pbuh) said, “A woman may be married for four qualities, for her property, her rank, her beauty and her religion; so get the religious one and prosper.” (Agreed upon)
The Prophet (pbuh) mentioned four qualities for which a man marries a woman, out of which a Muslim should prefer a religious woman for marriage because the company affects each other. Another reason is that a mother is the first teacher of children, and she can lead them the way she wants.