Why does changing the shape of an object have no effect on the density?
Changing the shape does not change its mass or volume, so density remains the same.
Density is an intensive property. This means that regardless of the object's shape, size, or quantity, the density of that substance will always be the same. Even if you cut the object into a million pieces, they would still each have the same density.