Well, first of all, EVERY physical quantity is measured in a combination
of 2 or more units, except for mass, length, time, and electric charge.
ALL other units are made out of these. So it should not surprise you.
[ Example: Speed = (length) / (time) ]
Density is not the mass of a substance. It's the mass of a substance in
a standard volume of it. So the density is made of the mass in any lump
and the volume of that lump. That way, no matter how much of a substance
you have, you can always compare the lump you have to all other substances.