Well, it’s hard to know exactly, but I think it’s a little of both. They are frequently purring in both activities.
But when they are rolling on their backs seeking to be petted that’s special in a different way because that’s a real expression of trust. Revealing their belly is a very vulnerable position as that’s where predators in the wild seek to attack so whenever a cat does that it shows how completely relaxed and trusting it is.
Some of my cats when kneading would sort of “zone out” and sometimes even drool a little bit so obviously this is a really strong sense memory for them.