The burger and shake combo has become—well, as American as apple pie. We associate this classic pairing with a kind of wide-eyed, American Graffiti-styled nostalgia, but in truth it’s more than a signifier of vintage Americana, or of glory days gone by. Just head to the nearest Five Guys or Shake Shack on your next lunch break and take a peek at the long line. Clearly, the burger and shake combo never left us; it’s as essential to modern American life as it has ever been.

But how did this combination start—and how is it that burgers and their various accouterments came to define the American fast food landscape?

The American Burger: A Crash Course

Though it seems like the great American burger has been with us forever, in fact it’s an invention of the past century or so—initially an immigrant food. First known as the Hamburg steak, the hamburger was brought to this country by German immigrants, and spread across this nation primarily through state fairs.

That’s not to say there weren’t some bumps along the way; before the burger could really catch on, it had to overcome the widespread perception that it was a food for factory workers, very much low-class and made from questionable ingredients. Various burger joints, through a combination of better ingredients and savvy PR, worked to shake the stigma and turn the burger into something with true mass appeal.

One burger joint, in particular, helped this food overcome its image problem. White Castle, founded in the 1920s, is today known for its popularity among potheads more than its culinary brilliance, but that wasn’t always the case. A long time ago, White Castle set the standard for safety and consistency in a fast food setting. White Castle’s chefs took the state fair “Hamburg steak” and started making it with premium beef; by combining this with a clean cut, family friendly image, White Castle was able to make the burger into something more than just a “working class” staple.

But What About the Shakes?

History of the Burger and Shake Combo

The rest of the history you probably know: McDonald’s and other fast food chains ensured that the burger became a kind of quick-and-easy comfort food—something that would be the same every time you ordered it, whether in a McDonald’s in South Carolina or in Idaho.

The shake came into the picture as an outgrowth of this mindset—the ultimate pairing of savory and sweet comfort foods that could be easily replicated by cooking crews everywhere. And while other combinations have emerged as popular—burgers and beer, for instance—the burger and shake combination still defines the American fast food experience more than anything else.