Moons of gas giants are indeed potentially good places for habitable planets. At least, they are now that we know that gas giants can be in orbits within the so-called "life zone", where the star's heat is enough to produce liquid water yet not boil it away, or that orbiting a gas giant further out can produce enough tidal heat within a moon to keep a subsurface ocean liquid. We didn't know that back in 1977. Then, the best theories we had of planetary system formation and evolution suggested that gas giants could only form in outer regions, beyond the cutoff where water would be present only as ice, and that any moons orbitng them would be dead, frozen worlds.
We praise George Lucas for his foresightedness!
Transcript
GM: You arrive at the giant planet of Yavin.
GM: The Rebel base is hidden in the jungle of the fourth moon.
Rebel Lookout: Commander, unidentified ship approaching.
Rebel Commander: {over radio} Appearance?
Rebel Lookout: It's kind of decrepit. Shaped like a hamburger with an olive stuck on the side.
Rebel Commander: {over radio} <sigh> Let it in. It must be one of ours.