When they were building the walls, they inserted wooden blocks into the walls so that they could climb on them as the walls got higher. Once the walls were complete, they took them out, leaving the holes. The holes then act to prevent the walls from cracking with the changing temperatures by somehow absorbing some of the expansion and contraction.