Good research. Thank-you.
From my reading of the unabridged 1001 Nights by Sr. Richard Burton, it all began when the sultan, who went to visit his brother, came back because he forgot something, and to his surprise, he found his wife in the arms of “a greasy, blackamoor, “ (IIRC the exact line), who he quartered.
From then on, he married a woman and then killed her in the morning, decimating the virgins in the area. Hence, the beginning of the Shahrazad story, the daughter of the vizir, who used her smarts to tell a never ending story within stories.
Oh, I digress.
Learned it in elementary school, circa 1958. I thought there was something weird about it even then.