hhmmmmm....it always worries me when you have to expalin a joke, because it is never funny then. But here goes.....what happens to your bodily functions when you drink lots of beer??? It relates to the saying of being "pissed"
The 3 little pigs story relates to the tagline of This little piggy....[while holding one of each of your five toes....]
This little piggy went to market,
This little piggy stayed home,
This little piggy had roast beef,
This little piggy had none, and
This little piggy went...
wee, wee, wee, all the way home!
now, that's funny!