Density is independent of changes done to the mass or the volume of a substance because it expresses the ratio between mass and volume.
Density is defined as mass per unit of volume, i.e. how much mass of your substance you get per, say,
If you remove some of that mass, you'll also reduce the volume your substance occupies, since the mass you remove has a volume of its own. This means that the density of a substance is independent of changes in mass or volume.
So, let's say you have substance that has a density of
When you have 2 g of your substance, the total volume it will occupy will of course be 2 cubes. The density will be equal to
If add 0.5 g more, the total volume of the substance will be 2 and 1/2 cubes, which means that
And so on.
The same goes for removing mass. If you start with your 1-g cube and remove 0.5 g, you'll be left with a volume of 1/2 cube. That's why density is independent of changes in mass and volume, because you can't change one without changing the other.
Keep in mind, a substance's density is not actually constant, but it can be assumed to be constant for most solids and liquids at normal pressure and temperature variations.