All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The wife is the partner and confidant of the husband. She is the person to whom he confesses his private matters. She is the mother of his children. In one word, she is the most important pillar of the family. This is why Islam gave an utmost importance to the choice of the wife considering the pious and good wife the best thing one should yearn for and desire.
The most important condition that the Sharee’ah sets for the future wife is piety; i.e. religiousness. Indeed, religion is the guidance of the heart and the mind. After piety, there are other characteristics which the person normally tends to look for. The Prophet said: “The woman is married for four things: her wealth, her status (noble lineage), her beauty and her religion. Choose the religious one; you will prosper.” [Al-Bukhari and Muslim]
The Prophet describes the good woman as: “The best woman is the one who pleases you when you look at her, who obeys you when you order her (to do something), and who preserves herself as well as your property when you are out (in a travel).” [At-Tabaraani] Apart from that, it is recommended that the woman should be one that has a known lineage, from noble environment, known to be good. She should be one that has always stayed away from all aberrations and misconduct. This is because she is the deliverer of the children, their educator. It is in her cradle that the child learns all his first knowledge of the world and gets most of his future traditions, customs and behavioral aspects. It is there that he gets to know his religion and starts his social behavior.
Now if the above is neglected, marriage might result in bitter and harmful consequences, such as the unsettledness of the husband and his children. Since the Prophet considered “good lineage” one of the reasons for choosing one's wife, then marrying a woman whose lineage is unknown is contrary to the most appropriate if the man has the alternative. But her having an unknown lineage does not necessarily mean that she is bad. Indeed she might be a well-educated pious person. Anyway, it is more appropriate that the woman whose lineage is unknown be married to a man who is of the same characteristic. But the one who is from Zina can cause much damage to her future husband and children.
Allah knows best.