Pygmalion
When we talk of illegitimate children, we really mean that the relationship between the parents was "illegitimate." But few are as illegitimate as Pygmalion and his wife. In the original Greek myth, as retold in Metamorphoses X by Ovid, Pygmalion makes a statue from ivory and falls in love with it. He begs Venus to bring his creation to life and she obliges. Although he had vowed never to marry, Pygmalion now marries his creation and they have children. It's a bit like marrying one's personal sex robot in modern times.
To go back a bit, this story was particularly popular from the late 17th century - in music theater, sculpture and painting. Very little of it was any good. If told without irony, the story is inherently misogynistic. Therefore, we can only wonder if the actresses were naked on stage or in the artist's studio. This is her, in Étienne Maurice Falconet's sculpture of 1763 in the Hermitage, St. Petersburg.
But, with Rousseau's Pygmalion, a short prose melodrama set to music, written in 1762 and first performed in 1770, the myth was reshaped in two ways. First, Rousseau gave the woman a name - Galatea - drawing from pastoral traditions in which she was a prominent character and thus giving her some legitimacy in her own right. The name stuck.
Second, Rousseau has Galatea woken into life by the sculptor himself; it's not by divine intervention. Pygmalion had been reflecting on vanity and the struggles of the artist to create and, no surprise, Rousseau wrote this around the time that Émile was being banned and burned. Perhaps he was reflecting on the at times strained relationship between a writer and his creation, as well as on his recent tumultuous relationship with Sophie d'Houdetot? The point, though, is that Rousseau's version introduces a psychological and autobiographical explanation for the myth. His play was way over the heads of most people, of course, and the sculptures, paintings and drawings of attractive naked women continued unabated. Below is one of several versions of Pygmalion and Galatea (1890) by Jean-Léon Gérôme.
If the romance between the lovers was always illegitimate in most people's eyes, an example of a mad obsession, then that is also why it remained popular. After all, there are men who fall in love with inanimate objects, rather than with flesh and blood women, and this is a matter of some interest. To place those men in a good light, you could say that the Pygmalion myth is about the moment when those obsessed men actually wake up to their own sexuality.