Dear thinking student,
According to the Qur'an and science, life began as a unicellular organism from a mixture of water and clay. From then on evolution took place over millions of years until it reached the high point - we human beings.
The initial parting of the life cell into male and female has nothing to do with cousin marriages.
In Nature, animals mate with their closest relatives without any harmful consequences to their progeny.
HUMANS: Most religions seem to forbid cousin marriages but the ordinance is not found in their scriptures. It is based on their scholars' whims and culture.
The Qur'an does not forbid cousin marriage but it ordains us to use our intellect and keep learning: RABBI ZIDNI 'ILMA (My Sustainer! Increase me in knowledge).
Cousin Marriage is very common among Muslims and it bears no negative consequences. However, continuation of the practice through generations is not advisable for genetic reasons. All families are prone to have some minor or major diseases. Continuation of inter-marriage through generations will reinforce this predilection.
So, stray cousin marriage is OK but continuing it over generations can beget medically undesirable consequences to the offspring.
Please see QXP for evolution: 6:2, 7:189, 15:26-27, 22:5, 23:12-13, 25:54, 32:7-9, 35:11, 37:11, 71:17.