What is in the ear piece?
Normally there is a small magnet, a loop of coil and a diaphragm. The current going through the coil is modulated so that it makes the coil move in the magnetic field and the diaphragm, which is attached to it. The movement of the diaphragm generates the sound.
Why do they repel as opposed to attract?
Because the two magnets are oriented the same way.
A longer and more interesting answer is the following. Most modern music has monaural lower frequencies. This is because the kick drum and the bass in rock and pop are positioned in the centre of the audio spectrum.
Now, the lower frequencies are the ones that need more electromagnetic energy, because they need to push more air - the wavelength is longer - and they are in-phase between the two ear pieces.
So in practice, when you listen to music, you feel more force pushing outwards. If you were to listen to music with out of phase basses, you would feel less force.
How come my ear buds don't seem to do it?
For a number of reasons.
- they are smaller, therefore there are smaller forces involved
- the diaphragms are smaller and the earbuds are therefore built to have far less low frequency response