Viral stories of discrimination in fast-food chains have become common in recent years.

In some cases, these viral stories can create company-wide change and spark a national conversation, as in the case when two black men were arrested at a Philadelphia Starbucks in 2018.

In other instances, hoaxes go viral, putting workers at risk, such as when a police officer recently lied about a McDonald's worker writing "f---ing pig" on his cup.

Sign up for Business Insider's retail newsletter, The Drive-Thru.

Visit Business Insider's homepage for more stories.

The incidents always seem to follow a familiar pattern. An account of an offensive situation at a popular restaurant chain will go viral, often on Facebook. Maybe a diner will claim to have found an offensive message scrawled on a receipt or paper cup; maybe an employee is accused of choosing to deny customers service over the color of their skin, their disability status, or their work as a law enforcement officer.

Either way, there's always fallout. News coverage and social media outrage will morph into a positive feedback loop. The restaurant chain will often apologize, and the implicated employees may be fired. Or, alternatively, further investigation reveals the inciting incident to be a hoax.

The phenomenon of viral fast-food controversies is more than just another thing for workers to worry about. It's yet another sign that retailers are increasingly being forced to the forefront on social issues, including racism and attitudes toward police.

The latest such viral incident was first described in a Facebook post by Herington Police Department Chief Brian Hornaday, claiming a McDonald's employee had written "f---ing pig" on a police officer's receipt over the weekend in Junction City, Kansas. On Monday, the unnamed officer resigned, after admitting that he had lied about the incident.

Plenty of other similar controversies have also involved police officers. In Riverside, California, two deputies claimed that Starbucks employees had refused to serve them. The company apologized and responded that the pair had been left waiting for five minutes. Starbucks also apologized after an employee at a Tempe, Arizona, location reportedly asked six police officers to leave because their presence made patrons feel unsafe. In both instances, as in the Herington incident, the police themselves helped to publicize what they described as anti-cop discrimination.

—Riverside County Sheriff's Dept (@RSO) December 13, 2019

—Tempe Officers Association (@ToaAz) July 5, 2019

Starbucks was also the site of controversy as recently as December, when a worker in Oklahoma was fired after being accused of writing "pig" on a police officer's cup of cocoa.

But attitudes towards law enforcement aren't at the heart at every single such issue.

Viral footage has become a tool to combat discrimination

Protesters demonstrate inside a Center City Starbucks on April 15, 2018 in Philadelphia, Pennsylvania. Police arrested two black men who were waiting inside the Center City Starbucks, which prompted an apology from the company's CEO. Mark Makela/Getty Images

In restaurants and beyond, cell phones and social media have empowered customers to spotlight instances of discrimination and hold violators accountable.

At a Bonefish Grill in Raleigh, North Carolina, three African American patrons captured a white customer calling them the n-word in an incident that went viral, WRAL.com reported.

In November 2019, a diner's Facebook post about the racism she and her party, which largely consisted of people of color, experienced in Buffalo Wild Wings also went viral. Employees at the chain were fired after being accused of moving the group around to better accommodate a pair of regulars who workers described as "racist."

Perhaps the most famous incident in which a viral video captured discrimination at a chain was when two black men were arrested at a Starbucks in Philadelphia in 2018.

While many chains have apologized for employees' actions, in some cases firing works, this incident had farther-reaching repercussions than most. Starbucks apologized and announced plans to temporarily close all locations in the US to "conduct racial-bias education geared toward preventing discrimination." The coffee chain additionally announced plans to open its bathrooms to all people, 100% of the time.

Starbucks realized that an incident in a single store could impact the massive chain's reputation across the US and around the world — especially as other people of color shared similar stories of discrimination at Starbucks and other public areas. So, the chain took action.

However, with the near-guaranteed virality of these incidents, restaurant chains are also in danger of attracting fraudsters and hoaxes.

Going viral can cause massive problems

The Herington police officer was not the first person to perpetuate a viral hoax that could threaten fast-food workers' livelihood. Other incidents have also proved to be purposeful attempts to game the viral system.

In November 2018, a Chipotle manager was fired after being accused of racially profiling a goup of young black men in a viral video. However, after the video was viewed millions of times, old tweets resurfaced showing that the man who filmed the video had a history of dining and dashing. Chipotle announced that the chain had decided to rehire the manager after reviewing evidence.

"Based on our review, we have offered our manager her job back," Chipotle said in a statement to Business Insider at the time. "While our normal protocol was not followed serving these customers, we publicly apologize to our manager for being put in this position. We will work to continue to ensure that we support a respectful workplace for our employees and our customers alike."

As incidents go viral, workers are put in an uncomfortable position of facing massive amounts of public backlash that may or may not be justified. It is typically up to franchisees or corporate headquarters to decide whether they will lose their job. While the franchise owner of the Junction City, Kansas, McDonald's used video footage to defend the worker, not every employee feels confident their employers would have their back in the same way.

"Any mistake and they fire you to try and save face with the brand," said one Starbucks employee who was granted anonymity in order to speak frankly about their feelings around the chain's responses to recent incidents.

Viral incidents are part of a bigger shift

Customers are quick to complain on social media. ChinaFotoPress / Getty Images

Viral accusations of discrimination are relatively rare. However, day-to-day errors can take on a new level of heightened importance thanks to the massive reach of social media.

Last year, a man posted that he'd been mistaken in accusing a Jimmy John's employee of writing "b----" on his wife's sandwich; in fact the worker had merely indicated that she had ordered a BLT with cheese — BLTCH. Fortunately, the diner brought up the issues with Jimmy John's workers before taking to social media. His post went viral because it was a funny misunderstanding, as opposed to an allegation that could have cost someone their livelihood.

One McDonald's worker said that, while he was not particularly concerned about an accusation of discrimination going viral, he has dealt with situations where a human error — such as a burnt McMuffin — sparked massive backlash after a customer posted a photo on social media. Attempts to remedy issues with free food were rebuffed, as McDonald's bashing exploded online.

"When I reach out and try to make it right and you act like an a--hole about it, it hurts," the McDonald's employee said. "It does, because I take pride in the food and drinks that come out of my store."

With social media, incidents that once could have been dealt with between employees and customers — at most garnering local news coverage — have become national stories.

In some cases, this can lead to positive changes. Viral photos and video footage force a wider audience to confront instances of discrimination and can push companies to try to make positive changes, as in the case of Starbucks' anti-bias training.

But, in other instances, it puts workers at risk. Social media puts stories in front of a wider audience without any expectation of fact-checking, as people tend to respond instinctively to a shocking incident. Chains realize that taking action is essential to protecting a brand's reputation. As a result, employees often bear the burden of dealing with consequences, without any larger-scale changes.

And so, in a time when a single snapshot or minute-long clip has the power to both right wrongs and unfairly tear lives apart, it's a good reminder for fast-food establishments, media outlets, and observers to approach such incidents thoughtfully. Take a breath. Review the facts. Then ask more questions.