Humans seem to be fascinated by animals who can do things that we cannot. And so it is with cats purring. We cannot purr, so we are interested in how cats can do it.
Humans happen to smile and laugh when they are happy, and dogs wag their tails.
So it is not unusual for an animal to have a physical reaction to happiness. Cats show happiness by purring. Two of the links listed below describe the actual mechanism that allows cats to purr. The wiring travels from the brain to the muscles in the voice box, and this wiring is able to vibrate the muscles so that they act as a valve for air flowing past the voice box. The air passes through the valve, which opens and closes rapidly to create the purring sound.