The primary idea of material with an irregular surface is to reduce or eliminate wave reflection.
The purpose of the rough surface is to break the sound waves, and to cause wave interference upon reflection. Both actions reduce the intensity of the reflected sound.
In the case of the holes, the sound waves pass into the material, where they are absorbed. The absorption prevents reflection.