Just about everyone knows that the sandwich was invented by the Earl of Sandwich. It was his solution to gambling and eating lunch at the same time without smudging food all over his cards. But do you know where the Granny Smith, that apple pie staple, comes from?

“Granny Smith apples were created by a woman in Australia named Maria Smith, aka Granny Smith,” Josh Chetwynd the author of How the Hot Dog Found Its Bun: Accidental Discoveries and Unexpected Inspirations That Shape What We Eat and Drink tells The Independent.

“She would make pies with another form of apple and then throw the cores out the window of her kitchen in Tasmania. One day she noticed that a new type of apple was growing from her impromptu garbage pit. Granny took the apples, which were created by a concept known as open pollination, and, voila, a new strain of apple was born.”

Chetwynd is full of such incredible food stories. Not stories of entrepreneurial chefs toiling over the stove to create a dish to transform the culinary landscape, or a scientist tasked with making a an existing food more palatable to boost sales. These are 75 food pairings that happened serendipitously.

But food truths are hard to come by - and often on purpose. It all comes down to sales. “The first thing you need to understand about accidental food discoveries is that it’s an area of food history that is rife with suspect mythology,” he warns. “My theory on this common problem is that a great origin story offers a wonderful basis for marketing a product. In other words, if you remember a fun story behind the start of a product, you are, perhaps, more likely to buy that product. As a result, in so many instances you need to take food creation stories with large grains of salt.”

The story of the hotdog, for instance, was tricky to pin down. It may have been invented in St Louis in the 1880s by a street vendor selling the meat, which at that time was called red hots or frankfurters. When the vendor realised the white gloves he was using to hand out the dogs were hurting his profits, a local baker suggested serving customers meat in a bun. The other contender originates from Coney Island, where a man named Charles Feltman wanted to stock his pie and sandwich cart with slimmer stock - and the hot dog was born.

Creative vegan dishes from YouTubers - In pictures Show all 15 1 /15 Creative vegan dishes from YouTubers - In pictures Creative vegan dishes from YouTubers - In pictures Vegan naked chicken chalupa Creative vegan dishes from YouTubers - In pictures Easy vegan brownie bites Creative vegan dishes from YouTubers - In pictures Maple peach pecan overnight oats Creative vegan dishes from YouTubers - In pictures Macaroni skillet Creative vegan dishes from YouTubers - In pictures Cauliflower buffalo wings Creative vegan dishes from YouTubers - In pictures Vegan animal style fries Creative vegan dishes from YouTubers - In pictures Cheese Brussels sprouts tots Creative vegan dishes from YouTubers - In pictures Vegan beer and cheddar bread bowl dip Creative vegan dishes from YouTubers - In pictures Vegan s'more tacos Creative vegan dishes from YouTubers - In pictures Vegan chicken ceasar wraps Creative vegan dishes from YouTubers - In pictures Caramelised onion dip Creative vegan dishes from YouTubers - In pictures Tortilla soup and cheesy taquitos Creative vegan dishes from YouTubers - In pictures Easy vegan chilli Creative vegan dishes from YouTubers - In pictures Vegan chocolate hazenlut tarts Creative vegan dishes from YouTubers - In pictures Cassava bacon

But one story that he is certain is true is the tale of the Chimichanga, or friend burrito. “Monica Flin owned a restaurant in Tucson, Arizona called El Charro Café. She often had nieces and nephews hanging around so her kitchen could be a mad house. One day, with all the craziness around her, she knocked a burrito into a deep fryer. She allegedly yelled out, “Chimichanga!” in frustration - it was a soften expletive considering all the kids were around. The name and the ensuing dish that was pulled out of the fryer stuck.”

His favourite, however, is the tale of the Graham Cracker - a cinnamon biscuit used to sandwich toasted marshmallows and chocolate for s’mores in the US - which conjures up images of campfires and comfort food for Americans.

“They were originally created to try to diminish libido,” explains Chetwynd. “Their inventor initially made the biscuits with unrefined products because he believed that industrialised food were making people all hot and bothered - in a sexy sense. It’s a bit ironic that they turned into an essential ingredient for sugary s’mores”

Looking back on his book, Chetwynd wishes that he had included the story of tonic, which wasn’t used as a pairing with gin by as a prophylactic against malaria because it contains quinine.

Other stories which are entertaining but not verifiable and didn’t make the book include the white wedding cake. “The story goes that we traditionally have white wedding cakes because in the sixteenth century it was a sign of wealth. Sugar was becoming increasingly refined. The more refined, the whiter it was. The most wealthy could afford the most refined sugar, hence white cakes as a status symbol of wealth.”

A theme that popped up time and again as Chetwynd wrote and researched his book was that of necessity. It seems it really is the mother of invention, even when it comes to hot dogs.

“Necessity is often a huge player in this process. Both the Cobb Salad and the Caesar Salad were both started, as the stories go, by chefs who had run out of ingredients and needed to prepare a dish on the fly. Nachos have a similar story.”

At the same time, the inventors of the longest-lasting food ideas had the foresight to realise their discovery had great value, adds Chetwynd.

“The idea that luck alone doesn’t lead to success is one that resonated with me,” he says.

“It takes a lot of skill to both recognise that something – even if found by accident – is worthy of development and the ability to carry that idea across the finish line into a full-fledged product" - even if that product is as simple as the humble hot dog.