Cats like to remain clean but then again you probably do too. Cats don't want their scent to alert their prey and predators and rivals that there's a cat in the area.
Grooming by other cats with their barbed tongues keeps their fur free of knots which can become dirty and hold scents, which they want to avoid, and the saliva cleans the fur too. The other reason is connected to this: cats have nerve endings clustered in such a way that being groomed feels good.
It's all part of bonding.
This is an evolutionary function: If grooming feels good, they'll groom more often and be groomed by other friendly cats. By grooming each other, they all remain clean and therefore safer and more likely to get a meal. They all benefit from this. So cats who enjoy the sensation of something rubbing against their fur, e.g. another cat's tongue, or a human hand, are more likely to clean and be cleaned, and therefore survive. The same nerves that make them enjoy a cat's tongue are activated by a good rub/scratch from their loving humans.
The petting they then expect is just part of the cat social structure.
The other reason that is suggested as to why they like petting so much is also connected to tongues.
They want to share a scent with you, to make a smell that they associate with family. This is a more controversial point as it's not known for sure whether cats use scent as a social/familial marker, as this would seem to contradict with their neurotic attempts to remain scentless.
Though as most of us know, our own cats normally do have a gentle scent, and it's normally absolutely lovely!