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 Lawmaker (i.e. Allah, the Great and Almighty) has made desirous marrying the righteous and pious woman and has urged the woman to marry the righteous and pious man.
Abu Hurayrah narrated that the Prophet said: “A woman is married for four reasons: her wealth, her family lineage, her beauty, and her religion. So choose the religious one, and you will prosper.” [Al-Bukhari and Muslim]
He also said: “If a man whose religion and moral conduct are pleasing to you proposes to you, then let him marry; otherwise there will be great mischief and corruption on earth.” [At-Tirmithi]
There is no difference in this between the relatives and other people, if all of them are pious and righteous.
Some scholars even preferred the marriage to non-relatives as the children that come from this marriage are usually more intelligent than the children coming from marriage to relatives. It is said: “Marry non-relatives to avoid weakening your children.” Some people also said: “Non-relatives are more productive and relatives are more tolerant.”
Again, marriage could end in divorce and this, in turn, could lead to breaking the ties of kinship between the two married relatives while Islam orders Muslims to tighten the ties of this kinship.
Scientific research has proved that marriage between relatives could cause genetic diseases because the genes causing these diseases gather up from the two relatives. But if marriage is between non-relatives, this probability becomes less evident. This might be the reason why Islam has forbidden incest marriage. So, the closer the blood relationship, the more probable these diseases could happen. Allah Says (what means): {Does He who created not know, while He is the Subtle, the Acquainted?} [Quran 67:14]
Allah knows best.