Using distance moduli makes computing magnitudes easy. As for instance, a solar type star (M= 5) in the Andromeda Galaxy (DM= 24.4) would have an apparent magnitude (m) of 5 + 24.4 = 29.4, so it would be barely visible for the Hubble Space Telescope which has a limiting magnitude of about 30. Since it is apparent magnitudes which are actually measured at a telescope, many discussions about distances in astronomy are really discussions about the putative or derived absolute magnitudes of the distant objects being observed.