I've also heard that petting can overstimulate a cat. This explains why some cats will seemingly enjoy your attention one minute, and then all of a sudden flip out and run away or end up scratching you. I also saw something similar explained on one of the My Cat from Hell episodes (the show gets kind of repetitious, but he drives home some pretty good major points on common problems owners have with their cats). Here's a PDF from the San Diego Humane Society about it:
I'm really grateful my cat is a giant cuddle beast and has never shown signs of aggression after petting. In fact, it's always been me who tires out and stops petting, and he follows me and demands me for more!