Because each unit is 2cm, so when you find the volume, you get
units3 but since
unit=2cm you just get
23cm3Might be easier to think of it as scaling the volume, and from GCSE you should know that volume scales by the cube of the scalar since a 3D object has 3 perpendicular axis along which the scalar takes effect.
It's like saying "OK, the unit cube has volume 1 unit cubed. If it's enlarged by 2 along every side, what's the new volume?" and so each side enlarges by two, hence the new vol is
2⋅2⋅2=1⋅23