Reason:
Consider two cubes. One has side length 3 cm and the other is 5 cm. Their respective volumes would be 3^3 = 27 cubic cm and 5^3 = 125 cubic cm in that order.
The ratio of side lengths 3:5 becomes the volume ratio 27:125
This idea applies to pyramids as well because we can break down the pyramid into tiny little building blocks. Think of legos. These blocks can get smaller and smaller depending how much accuracy you want to have.