I was playing around with command blocks, trying to see what I could do with /summon, when I made a particularly long command, which summoned a baby siamese ocelot sitting down with a custom name of Gray, which was always visible. After accidentally suffocating poor Gray, I noticed in the chat that it said: "Gray suffocated in a wall". That confused me. Why did it notify me that the cat had suffocated?
I imagine it's because it was a named mob. Naming a mob also makes it never despawn.