Because high frequencies are blocked more easily.
I can't really explain it in detail, but sound is just a vibration in the air. The air molecules are bouncing back and forth from the audio source outwards. The higher the pitch of a sound, the quicker the vibration. When sounds passes through something, it means that it makes that thing virbrate which in turn makes the air on the other side vibrate as well.
If you think about walls, they are rather stiff. Because of their stiffness it's hard to make them vibrate at all, but especially hard to make them vibrate quickly. Because of this, high pitched sounds are blocked while lower pitched sounds pass more easily.
This works especially well when the sound resonates with the wall. In that case the sound waves hit the wall just right to amplify their vibration, like pushing a kid on a swing at the right time when it swings back to you.
A bit off topic: The freqency where this happens is tied to the properties of an object, respectively it's materials, and resonance can even destroy them in extreme cases. This is why vibrations have to be carefully considered in engineering. There is a famous video of a bridge collapsing, because resonance wasn't properly considered.