Short Answer
We do not know for sure but it is most likely that it was allowed due to necessity, since there were no other people on earth at that time. After that, marriage between them was prohibited, and remained like that ever since.
Version 0.25
Shaykh Mustafa Umar