I read somewhere that they purr when in pain or distressed. I think it said that it's thought that they do it to try and comfort themselves and calm themselves down. Would make sense for the vet visit but not sure about when they are asleep. One of my cat's used to snore very loudly but that's about it.