Medusa with the Head of Perseus
At some point in history, no later than the Roman poet Ovid, another part was added to the myth: Medusa starts as a human priestess and not a monster.  She works for the goddess Athena in her temple.  She is raped by the god Poseidon in Athena's temple.  To the people telling the myth, Medusa, not Poseidon, was the one who had done something bad.  Athena punishes Medusa by turning her into an ugly monster: Her hair turns into snakes.  Her face becomes terrifying.  Only then does Medusa go to the island where Perseus will later kill her.