The question of why cats purr sounds like a simple one, but there is a fair amount of dispute on the topic. As most people know, domestic cats purr when they are contented. A purring cat is generally a happy cat. And if you have spent a lot of time with a happy cat in your lap, you have probably noticed that the cat purrs both when she inhales and when she exhales. (I have one cat that gets so happy she purr-snorts.) Often two cats will purr while grooming each other to indicate happiness and contentedness.
Because kittens are born blind and deaf, one theory as to why cats purr is that the mother cat’s purring is a physical sensation that the kittens can feel to help them find mom so they can nurse. The kittens begin to purr in response when they are less than a week old. The theory here is that the kittens purr to tell momma cat that they are getting their milk and everything is going okay. Although cats can’t meow with their mouths closed, a kitten or cat can purr with her mouth closed, so the kitten can purr and nurse at the same time.
Not all purrs are happy purrs, however. Deep purrs may indicate that your kitty is in pain. Some cats purr when they are injured or dying. Other cats purr when they are afraid or distressed. Sometimes cats also purr when they are anticipating something good, such as food (one of my cats purrs whenever she sees me with the food container).
Because it’s very difficult for the "experts" to examine the innards of a cat while she’s purring, no one seems to really know exactly why or how cats purr. It seems that purring is sort of a Zen thing. Cats purr because they can.