It's called a Galaxy-class ship because it's intended to explore a galaxy, not multiple galaxies. If you wanted to build a ship to explore multiple galaxies, you'd have to name it Local Group-class or Universe-class!
Vonda N. McIntyre would dispute your reasoning. In her 1982 Wrath of Khan
novelization, she posited the existence of a new type of starship called the Galaxy
class, which was designed for intergalactic travel.
I remember that quite well from that novel. Sulu was due to get one of the new Galaxy class ships in that novel as I recall.