In the 1920s and '30s, Continental Bakeries sold baked snacks under the Hostess brand name. Many of the snacks were seasonal, with fruit filling. Hostess Little Shortbread Fingers were made with strawberries, so for several months of the year the equipment used to make them sat idle because strawberries weren't available.
The company vice president, James Dewar, wanted to make a product that could use that equipment and improve efficiency. His idea was a simple sponge cake with a flavored cream filling. On the way to a marketing meeting, he saw a billboard advertising Twinkle-Toe Shoes. And so, the Twinkie was born in 1930 [source: Hostess].
The first Twinkies were quite different from the ones we know. For one thing, they were made with banana cream filling, not vanilla. But in World War II, there was a banana shortage, and vanilla became the standard flavor. The eggs, milk and butter in early Twinkies gave them a shelf life of only two days. Dewar had his salesman replenish store shelves every other day, but the practice was expensive. So, the need for a longer shelf life led to many changes in the Twinkie recipe [source: Ettlinger].
Today's Twinkie has a much longer shelf life than the ones made in 1930, but not as long as some people think. A variety of myths and urban legends have sprung up around the Twinkie's longevity, claiming that it stays fresh for decades, would survive a nuclear war and that the company is still selling off the original batch made in 1930, still fresh almost 80 years later. In fact, a Twinkie's shelf life is officially 25 days [source: Snopes]. It's also a misconception that Twinkies are chemically preserved. Most of the chemical ingredients are replacements for the ingredients that allow a Twinkie to spoil, but they aren't strictly preservatives. Replacing eggs, butter and fats is what keeps Twinkies from going rancid. In fact, the airtight plastic packaging does far more to keep the cakes fresh than any of the actual ingredients do.
There are claims of Twinkies that have "lasted" for decades, such as one kept in a high school science classroom for 30 years [source: USA Today]. While it is true that the Twinkie continues to exist (like pretty much anything in a sealed plastic wrapper would), it is described as brittle. Reports that it is probably still edible are dubious, since no one seems willing to put that theory to the test.