This myth begins at the very creation of man and of Lilith (the first woman created for Adam).
So God created man and woman in his own image and blessed them. Many have made her a model for feminism, because when Adam would not relent in his domination of her, she grew so angry that she uttered the Holy name of God and vanished.
God then had to make Eve for Adam, making her of his rib bone, so that she would be attached to him and not leave as Lilith had done.
Here, Lilith went out to the Red Sea, where she made a bargain with the Angels and she was allowed to stay out on her own, as a witch, and MOTHER OF ALL DEMONS.