Being a judge at a macaroni and cheese competition in San Francisco taught me a lot about American food. The competitors were mostly chefs, and the audience—the online tickets sold out in minutes—was soaking up the chance to be at a “Top Chef” kind of event, but more urban and cool. The judges included a food writer, an award-winning grilled-cheese-maker, and me, a cheesemonger.

We awarded the win to a chef who made mac and cheese with an aged Vermont cheddar. The audience, however, chose another contestant. When he arrived at the winner’s circle, he made a stunning announcement: His main ingredient was Velveeta.

Amazement! Shock! Betrayal! The audience clutched their ironic canned beer but didn’t quite know how to react. Was it a hoax? A working-class prank against elitism in food? Was this contest somehow rigged by Kraft? In the end it turned out to just be a financial decision by the chef: In great American tradition, he bought the cheapest protein possible.

To understand the evolution of macaroni and cheese is to realize that pursuit of the “cheapest protein possible” has been a longstanding quest of the American food system. At times, cheese itself has shared a similar trajectory. Cheesemaking, which began 10,000 years ago, was originally about survival for a farm family or community: taking a very perishable protein (milk) and transforming it into something less perishable (cheese) so that there would be something to eat at a later date. Many of us today think of cheese in the context of tradition, flavor, or saving family farms, but a basic goal—whether a producer is making farm-made cheddar or concocting the cheeseless dairy product Velveeta—has always been getting as much edible food from a gallon of milk as possible. Cheesemakers weren’t always successful at this. Cheese is vulnerable to mold, rot, and maggots, not to mention pitfalls like excess salt. Many generations of cheesemakers have tossed countless bad batches, which meant feeding a lot of precious protein to their farm animals instead of their families.

The first cheese factory in the U.S. was built in 1851, making cheddar one of the first foods affected by the Industrial Revolution. Before that, all cheese made in the United States was made on a farm, usually by the farm wife or—on prosperous farms—a cheese maid or an enslaved woman. As foods industrialize, they often go from being made by women to being made by men, and so it was with cheese: Women were mostly absent from the make rooms of these new cheese factories, and didn’t return to cheesemaking until the artisanal cheese revolution of the past few decades.

Processed cheese, which was invented 107 years ago, is basically cheese that is emulsified and cooked, rendering it much less perishable (but also no longer a “living food” because, unlike natural cheese, processed cheese’s flavor will no longer alter with age). The advent of processed cheese has led over the years to innovations like Kraft Singles, Easy Cheese, powdered “sauce” for boxed mac and cheese, and Velveeta—a type of processed cheese when it was invented in 1918, and now a dairy-based processed food, with 22 ingredients, that is no longer regulated as a cheese.

Processing cheese was a good way to make food for soldiers at war, to turn safe but not-as-good-as-standard cheese into edible food, and to save producers when there was a glut in the market and too much cheese to sell. It was also a good way to get nutrients to people who didn’t have refrigeration. Ironically, perhaps, it was the culmination of the age-old cheesemakers’ goal: producing as much edible food as possible from the original protein.

Although processed cheese was invented in Switzerland, big American cheese producers—as part of our factory-scale, get-big-or-get-out philosophy of food production—bought into processed cheese so heavily that the very definition of “American cheese” has come to be a processed product. Many Americans may never have had a macaroni and cheese made with real cheese, and many who grew up on mac and cheese may never have had a version that wasn’t made with a powdered mix. While the most popular brand of boxed mac only just recently quietly removed artificial colors and preservatives from their “cheese sauce,” it seems, from a traditional roux-making perspective, still far removed from the original recipe.

Macaroni and cheese has been served as long as there has been a United States of America, but in a 20th-century economy driven by convenience packaging and industrialization, it was elevated to an ideal American food: Pasta and processed cheese are very cheap to make and easy to ship and store, and they certainly fill up a belly. It’s no wonder a hot gooey Velveeta mac and cheese tastes like a winner to so many Americans, even those attending a fancy contest in San Francisco.

As with many foods, white culture and African-American culture diverge on the make and use of macaroni and cheese. Food historian Adrian Miller points out that while Thomas Jefferson often gets credit for popularizing macaroni and cheese in the United States, it was of course his enslaved black chef James Hemmings who learned to cook it. In the Antebellum South, mac and cheese was a weekend and celebration food. Many African Americans have continued this tradition to this day.

I have a collection of quotes I post above my computer for writing inspiration and as a reminder to examine my own historical assumptions. One is from Miller from the Charlotte Observer on November 15, 2017: “They [older black people interviewed by Miller for his book] were convinced mac & cheese was something white people stole from us. I thought they were kidding, but they were like, ‘No, it’s like rock ‘n’ roll—we started that.’ They were serious.”

This is the conundrum and beauty of mac and cheese. It is one person’s survival food, another person’s staple main course, and yet another person’s food of culture and celebration. Divided, as America is, along class and race lines, when you bring up mac and cheese you have to be careful or you may be talking about a different mac and cheese altogether.

The one thing that does seem to unify people who eat macaroni and cheese is that everyone views it as “comfort food”: Whichever form of mac and cheese people grew up with, it provides them with something visceral that they want to recreate as adults. In my experience selling food, I’ve seen many folks who eschew one of the major components of the dish, due to allergies or politics, yet expend great effort trying to find or create gluten-free or vegan simulacra. It’s just that important to them.

I truly grasped how macaroni and cheese works as comfort food while visiting cheesemakers in Maine and Vermont in 2006 to meet some of the artisans whose food I sold and to learn more about the cheeses of the Northeast. That year was an amazing time for cheese. Decades of work by back-to-the-landers and multigenerational cheesemakers were finally coming to fruition and an appreciation for the beauty of inefficiency had provided an opportunity for American cheesemakers to start creating new cheeses, and to reinvigorate old-fashioned ones that had never industrialized or had gone extinct in this country altogether.

At that time, all of this cheesy activity was new, and because of that, these artisan cheesemakers often welcomed us with spare beds and home-cooked meals.

They gave us so much cheese that we had to put out the word to friends and friends of friends, who met up with us in convenient parking lots as we drove through small-town New England. We handed them cheeses out of our rental car trunk—brainy-looking goat cheeses, clothbound cheddar, oozy rice-flour-rinded Teleme, pungent blues. That many of these cheeses were just a few years away from being recognized as some of the best in America made it an especially sweet contribution to our extended community. To passersby, it must have seemed like the oddest smelling drug deal ever.

Unfortunately, one of the cheese-making couples we had been looking forward to visiting had begun breaking up by the time we arrived. As we pulled up, one half of the couple had moved out temporarily, while the other half and the kids were packing their things to move out permanently. We stayed in that house to be supportive, surrounded by all the emotions that go along with a breakup, especially a sudden one: anger, blame, despair, doubting of self-worth, fear of the unknown … all of ‘em.

I don’t remember whose idea it was to cook a big dinner, but it gave us something to do during the time we thought we’d be talking cheese and frolicking with the farm animals. What does one cook as an antidote to despair? Especially when one is staying at a farmstead dairy and loaded down with the best cheese the Northeast has to offer? Mac and cheese, of course.

Someone was dispatched to raid the farmstand shop. I brought out our collection of cheese from the farms we had visited. If we had actually paid retail, our meal might have been the most expensive per-serving mac and cheese in history.

But that wasn’t why it was so great.

Our mac and cheese elevated us emotionally because it brought everyone together for the common tasks. There was cheese grating, roux making, onion chopping, vegetable prepping, side dish making. Soon, while despair was not entirely gone, it wasn’t quite as thick. The rehashed jokes of shared cooking inevitably came. The anticipation of something-that-was-not-misery came. When the meal was prepared, we all sat down to eat—and drink—and create the possibility of new community in the very location where the past configuration had been destroyed. That is what comfort food does.