A triple integral accumulates a density throughout a volume.
Over B=[0,L]×[0,W]×[0,H], the average of each coordinate is half its upper bound. The average affine density is therefore (L+W+H)/2. At height z, integrating across the slice gives LW[(L+W)/2+z], whose integral in z gives the same mass.
The integral of density has mass units; volume alone would use integrand 1.