What is the foam tube on the top of bmx frame for? What is the foam tube found on some bmx bikes for?

Here's an example:



Besides for advertising, I'm guessing its there to save biker's legs when doing tricks, but I could be wrong, because I've seen most bmx bikes without it. 

What exactly is it for?
It's to ensure that young boys who ride BMX bikes will be able to have children when they grow up.


Fine print: More accurately, it’s to assuage the worries of the parents that are buying the BMX for their young male child that they might not have grandchildren. Actually efficacy for such purpose is under debate.