Cats purr not only when they are happy, but also when they are content, relaxed, or seeking comfort. The act of purring is believed to release endorphins in cats, which help reduce stress and promote relaxation. It can also serve as a form of communication, signaling to their owners or other animals that they are feeling calm and safe.