The density of the stone and gravel are the same because density is an intensive property of matter. It does not depend on the amount of matter present in substance.
Density is defined as the amount of matter present per unit volume of a substance.
Density =
The density of every substance is unit no matter its volume or mass.
An intensive property is a property that does not depend on the amount of matter present.
This is why the stone and gravel will have the same density.
But the mass and volume are different. Such properties are called extensive properties.