When riding the tramway or walking in the street, wearing earphones creates a certain distance, it basically shows that you are in your own universe, listening to mysterious tunes. People, seeing this, interact with you differently, and if they are wearing earphones, lost in their own music, they expect you to do the same.
Cats are different, they treat you the same whenever you are wearing earphones or not: in any case you are in a different universe. There is only one logical explanation: they have invisible earphones and are listening the cat music from another universe. This music is generally inaudible for humans, except the tunes that make cats very happy: then you can hear the purring. The purring is not produced by the cat, it is merely the audible part of the happy tune they are listening to.