Each year, a new batch of hot summer songs hits airwaves and earbuds, dominating top-40 charts and iTunes sales. But there are a handful of popular tunes that never fade away, ever present throughout the world’s streets on sunny summer days: The familiar jingle of ice cream trucks.

You can probably hear it in your head: A jingling, old-timey ditty echoing down the streets of your neighbourhood. It was your cue as a kid to start sprinting down the sidewalks, coins clutched in your fist, ready to buy that frozen treat.

But where did this summer hallmark come from? Why are ice cream trucks some of the only vehicles that play music as one of their main functions?

It’s a strange, surprising story, and the answers have effects far beyond popsicle sales.

How ice cream became a mobile, sellable food

The ancestors of the modern ice cream truck are some of the earliest vehicles, period. They’ve existed for centuries — even before the advent of automobiles.

Roman emperor Nero Claudius Caesar (37-68 A.D.) is rumoured to have sent runners to the mountains to fetch snow to be flavoured with fruit juices. The rest is sweet history: Since then, vendors have undergone a mobility upgrade, hawking frozen treats from push-carts, horse- or goat-drawn carriages and, finally, automobiles.

No one can say for certain who invented the ice cream truck (known in the UK as an ice cream van), or even ice cream, for that matter. But evidence suggests ice cream trucks precede the advent of the soft-serve variety that ice cream trucks specialise in.

According to ice cream lore, New York-based Thomas Carvellos began slinging cones from his truck in 1929. On one particular outing, his truck hit a bump that caused a flat tyre, leaving him stranded with a supply of rapidly melting ice cream. Rather than calling it a day, he continued selling the melty confections, which customers seemed to enjoy more than the fully frozen dessert. And thus, it is said, the Carvel soft-serve business was born.

But a problem remained: How would one lure customers to these moving dessert dispensaries? Music: That was the trick to bridge the gap between mobility and marketing.

The first ice cream jingle?

For Ohio-based candymaker Harry Burt — whose chocolate-covered ice cream on a stick was a stroke of genius in itself — covering his truck in bells not long after soft-serve’s invention was a game-changer.

When he began selling his sweets from a truck, he fitted it with sleigh bells that jingled along his sales route, announcing his presence in neighbourhoods along the way. The bells worked so well, Burt added them to 12 more trucks. Thus, the very first fleet of Good Humor ice cream trucks appeared.

It was so successful as a marketing gimmick, that it wasn’t long before the tinkling of bells morphed into full songs.

A savvy California businessman named Paul Hawkins replaced the simple bells on his Good Humor trucks cylindrical device equipped with nails that cranked out a tune, said Daniel Neely, author of Ding, Ding!: The Commodity Aesthetic of Ice Cream Truck Music, a 2014 paper published in the journal The Oxford Handbook of Mobile Music Studies. Using this custom music box, Hawkins’ trucks played the Eastern European folk tune “Stodola Pumpa”.

By the 1950s, electrical engineer Bob Nichols had taken the mechanical music box even further. He manufactured music devices specifically for ice cream trucks, featuring a library of jingles from which vendors could choose a song.

Nichols’ son Mark, who now runs Nichols Electronics, said that the most widely used ice cream truck jingle in the US today is The Entertainer. It’s a classic ragtime tune that dates back to the early 1900s, but reappeared in the pop culture spotlight when it was used as the theme to the 1970s film The Sting. In France, you might hear ice cream trucks blaring an old-timey rendition of Frère Jacques.

The weird appeal of folk songs

At this point, the ice cream truck industry had ushered in some of the earliest marketing jingles ever. And for some strange reason, they were often traditional folk songs native to the region. In the UK and Australia, for instance, the traditional English folk song Greensleeves is the most-used ice cream van jingle, to this day.

Greensleeves is a bit of a jingle anomaly, because of its minor key, which doesn’t typically evoke the childlike glee brought about by other songs. Minor keys often sound lower, duller, sadder, darker. That’s why we don’t often hear them in advertising jingles.

As the story goes, in 1958, Dominic Facchino founded the Mr Whippy ice cream van company in Birmingham, England, after visiting the US and witnessing the success of Mister Softee trucks. Robby Staff, who owns and operates a collection of vintage Mr Whippy vans in Queensland, Australia, said that Facchino was a big fan of Henry VIII, who throughout history has been credited with personally writing Greensleeves. Even the Mr Whippy logo, a cherub-faced ice cream cone, dons a beret that Staff said is a subtle nod to Henry’s preferred headwear.

Mr Whippy vans flourished in the UK, and the company soon expanded to Australia and then New Zealand, dominating all three mobile ice cream markets by the mid-1960s, pre-dating fast food’s popularity in those markets.

“In Australia, there was no McDonald’s or Kentucky Fried Chicken at the time. There was Mr Whippy, and this made such an imprint,” said Staff, who also contributed to the book The Mr Whippy Story. Over time, Mr Whippy became a generic term, he said, referring to the fact that people called all mobile ice cream vendors “Mr Whippies.” The company’s signature Greensleeves jingle, too, was adopted by other vendors. Voila: The jingle and truck became permanently linked, building brand recognition and revealed a relationship between advertising and mobility.

Although certain tunes are more popular than others in different countries, there’s one commonality that links ice cream vehicle jingles worldwide: The songs simply don’t change much as musical trends evolve. They are — pun intended — frozen in time. But why? And what’s with all the folk songs?

The jingle’s evolution — or lack thereof

In a way, the idea that ice cream jingles have only minimally evolved is completely at odds with the idea of jingles in general: The catchy earworms that were once the advert industries’ Trojan horse into the brains of consumers on radio waves and in TV commercials are now largely looked at as cheesy and outdated trinkets from yesteryear.

Matthew Nicholl, chairman of Contemporary Writing and Production at Berklee College of Music, has developed and taught classes focusing on jingle-writing, has personally written scores for use in film, TV and radio advertisements, even political campaigns: PBS, Nasa, Maybelline cosmetics, Subway sandwiches, and even campaigns for US presidential candidates Bob Dole and Ronald Reagan. He’s noticed that, since the mid-1990s, musical tracks produced for TV advertisements aren’t really jingles anymore.

“It’s what you’d call a spot, which is more like a soundtrack to a film,” Nicholl said. “In many cases, companies license existing songs rather than commission jingles. Lots of time when you’re contracted to write a jingle, they want it to sound like a popular song.”

Even though traditional jingles are fading from advertising, Nicholl says they still have a market in places like local and regional radio advertisements… and ice cream trucks.

“People really want to recreate that nostalgia for that hot summer day when ice cream was the perfect summer day for you as a kid,” Nicholl said.

Jingles, trucks, and nostalgia

Since nostalgia is what keeps those old-fashioned ice cream jingles alive, it’s why you won’t hear them blare the latest Rihanna single. Current pop hits don’t play off that need for nostalgia, and plus, people won’t immediately associate the song with a moving truck that sells ice cream the way a jingle does.

“People have tried to use popular music and people don’t recognise what it is. People hear jingles, and the kids know that is the ice cream man,” Nichols of Nichols Electronics said. If a truck were to play a modern-day song instead of a classic jingle, he said, people would wonder, “Was that an ice cream vendor or somebody just playing music real loud?”

There’s also the fact that quaint classics are simply recognisable everywhere, across generations and cultures. And because these songs are so old, they’re part of public domain and available to use free of charge.

Neely agreed, adding that the power of nostalgia is hugely important in the marketing something as innocent and sweet as ice cream. He illustrated this very concept in his academic paper, citing a 2003 project as an example. In this project, New York artist Erin McGonigle composed a collection of re-imagined ice cream truck tunes. She embarked on several ride-alongs documenting the effectiveness of each tune. Of them all, the song that garnered the best immediate response (ice cream customers) was a marching band’s rendition of Turkey in the Straw, which happens to be among the most widely used tunes by ice cream truck vendors.

However, there are some newer tunes that have proven adequate sales tools. The Mister Softee jingle is, perhaps, today’s “best-known ice cream truck tune,” Neely wrote — and it’s a fairly new tune compared to other popular ice cream truck jingles.

US-based Mister Softee, which operates in 15 states and China, hired jingle writer Les Waas to produce a jingle for a radio advertisement in 1960. The song was such a commercial success that it was converted to an instrumental chime version to be blasted from trucks, solidifying its status as the most widely recognized modern ice cream jingle. The tinkling tune is remarkably unchanged even today, “known to millions of people and a cultural icon throughout the United States,” Neely wrote in his article.

Producer Michael Hearst’s album Songs for Ice Cream Trucks has been adopted throughout the US, mainly because vendors are looking for alternative tunes “that actually sounds like traditional ice cream truck music,” Neely wrote.

The future of the ice cream truck

With the advent of supermarkets in the late 20th century, the number of ice cream trucks has taken a big hit: In the 1960s, the UK saw over 30,000 ice cream vans on the streets; today, there may be less than 5,000.

Even international ice cream truck mainstays like Mister Softee and Mr Whippy are moving toward more brick-and-mortar shops. The survival of the iconic ice cream truck is also dependent on the technological forces at play in transportation: Will we someday see self-driving, autonomous cars dishing out ice cream, using big data to pinpoint neighbourhoods with high demand or with high populations?

Whatever the future for this summertime vehicle holds, it’s clear that, as long as they’re on the move, they will still use jingles. The retro appeal of these increasingly uncommon flashbacks-on-wheels is what keeps the public’s love of them alive — and the traditional jingles alive, too.

“I think they’ll continue,” Nicholl said, “until our civilization falls.”

In-line Flickr image credits: Davis Staedtler, Beverley Goodwin, Mandy Turner

If you would like to comment on this or anything else you have seen on BBC Autos, head over to our Facebook page or message us on Twitter.

And if you liked this story, sign up for the weekly bbc.com features newsletter, called “If You Only Read 6 Things This Week”. A handpicked selection of stories from BBC Autos, Future, Earth, Culture, Capital and Travel, delivered to your inbox every Friday.