Solar System moons are named from mythology. Except for Uranus whose moons are named from English literature, primarily Shakespeare. How did this come about and what is the connection with the moons of Saturn?

Literary Moons of Uranus