Most cat-owners think their pets only purr when they are happy, but this isn’t exactly true. The purring sound we hear is the cat’s way of communicating that it means no harm, so while it often means they are content, cats also purr when they are scared or hungry.
Purring is a behaviour that isn’t usually seen in adult wild cats as it’s main function is communication between mothers and cubs. Bringing this sound out in a situation where the cat feels vulnerable lets an aggressor know that they will not fight back.
Adult domestic cats purr throughout their entire lives because they have been domesticated, so they never have to fend for themselves the way a wild cat has to. Over thousands of years cats have been bred as pets, and that process has left adult cats with some kitten traits, like playing and purring.
Image from www.flickr.com/photos/monica_r