"Incest wasn't forbidden in all cases. On occasion it was mandatory. ie. Pharoahs in Egypt."
It was mandatory for the pharaohs for reasons of politics & power, as I understand it. Egypt then was a union of tribes, some with patrilineal & some with matrilineal descent, and to keep the pharaohship in the family siblings had to marry each other, But the common people had to marry outsiders.