While Andromeda is a galaxy, it was originally called the Andromeda Nebula. Hubble's measurement, using Cepheid variable stars as standard candles, definitively proved that Andromeda was not a nebula within the Milky Way, but a separate galaxy entirely. This discovery was revolutionary, as it changed our understanding of the universe's scale and helped establish the Big Bang theory.
Therefore, the Andromeda Galaxy is not named after Edwin Hubble. It was named after the constellation Andromeda, where it appears in the night sky.