As you only freeze a very small section of the pipe the expansion, which starts as water drops below 4°C, can be taken up along the axis (length) of the pipe. If, however, the entire length of the pipe were frozen then most of the expansion would occur in a radial direction, and burst the pipe.