It happens because the glass absorbs acoustic energy on a natural frequency.