Think of specific gravity as a comparison tool rather than a measured quantity in its own right.
It tells you how many times denser a material is compared to water, so it is calculated by dividing the density of the material by the density of water. Both quantities being divided are densities, so they carry the same units, such as kilograms per cubic metre or grams per cubic centimetre.
When you divide a quantity by another quantity of the exact same kind, the units always cancel, leaving behind only a number. This is the same reasoning used for other ratio quantities in physics, such as refractive index or relative permittivity, which are also unitless.
So specific gravity, being a ratio of two densities, carries no unit at all, it is simply expressed as a plain number.