The rocks aren't blocking the drainage holes. The water can easily drain around the voids between the rocks, and get to where it needs to go.
The rocks are called "riprap". They were put there because apparently the water draining from the pipe was eroding the earth at the base of the drainage pipe or the structure around the pipe.
Usually riprap is used like at the base of storm gutter pipes where water can splash pretty heavily during heavy rains, or at the end of municipal drainage into ditches or trenches, where the heavy flow of water can erode away at the embankments. The rocks help break up the heavy flow, and thus minimize the erosion. They can be as small as pebbles or as large as 10 pound rocks, depending on the degree of water flow.
A picture of the rocks posted here would go a long way in helping us explain why they are there.....