I was prompted by Megan to write about this kind of comedy, though it has been brewing for a while.
I (just now) started calling this kind of joke the 'personal rhetorical.' That might be a hoity toity name for a story that pretends to be universal, but is actually a personal rant. It is one of my favorite kinds of jokes, mainly because it happens so often in conversation. It goes like this: Someone tries to make a generalization or teach a lesson like, "Never eat thirty minutes before swimming," or, "Don't you hate it when [insert universal truth about idiot drivers]." But -- here's where the joke comes in -- it ends up that the teller is just venting some highly personal rant disguised as a generalization.
Here's a clear example by one of my favorite comedians, Steve Coogan, doing a character called 'Duncan Thicket.' He actually lays out the rules quite well.
There are also a few funny variations on this. Louis C.K. does a great bit here where, instead of telling a lesson and then making it a personal rant, he tells a lesson and then employs it completely wrong.
"You've gotta be careful what you name your kid ... because other kids are going to make fun of them. They're going to make fun of their name. And you don't have to give them a weird name, because they can do it with any name. Kids are geniuses at that. Any name, they take it. They go, Louis Screwy. Joey Blowy. Mike your mother's a dyke ... Any name! [Asks an audience member] What's your name? Eric? You fucking asshole. See? Just like that. [Asks another audience member] What's your name? Joe? Eat a bag of shit, cuntface."
Actually, that entire Louis C.K. bit is so funny, I recommend watching the whole thing. He does this thing where he treats his 4 year old kid with adult standards of intelligence and manners. But! That's another post.