I have read before that cats sometimes get a "pleasure overload" and their only way to handle it is to attack. This is why they sometimes turn on you after too much scritchies. Also, sometimes you are petting them on a place that would be sexually stimulating to them, like on their bellies or their back near their tails. They will then turn on you because that's what they would do if they were not ready to mate. Males and females, even neutered and spayed cats, will sometimes do this. I have also heard they will also occasionally get fits and tear through the house with a wild-eyed look. This is to expend energy that builds up in a typical housecat, especially ones that don't go outside much or at all.
These theories may explain the perplexing behaviors we have all experienced at one time or another.
Bookmarks