When tensions in Charlotte, North Carolina, over the police shooting of Keith Lamont Scott quickly boiled over into violence, looting, and riots, many people on social media had the same reaction: Why are people destroying their own communities in such senseless violence?

But this misses the point. This sentiment, experts previously told me, underplays the real anger behind riots and urban uprisings. "People participate in this type of event for a real reason," Darnell Hunt, a UCLA professor who's studied the 1992 Rodney King riots in Los Angeles, said. "It's not just people taking advantage. It's not just anger and frustration at the immediate or proximate cause. It's always some underlying issues."

Related Charlotte protests erupt over police shooting of Keith Lamont Scott

Riots are the culmination of these underlying issues. They might be catalyzed by one particular cause — such as a police shooting — but they're also the result of long-held angers — broader police abuse, residential segregation, economic inequality, and racial tensions, generally, in America.

What's more, riots can lead to serious attention and change.

We see some of this in media coverage today: When Baltimore burst into riots after Freddie Gray died in police custody, its policing problems received a lot more attention by the press — and even led to a US Justice Department investigation that found a local police department plagued by racist practices.

But riots don't just lead to more attention — other urban upheavals in the 1960s and 1990s led to real reforms in local police departments and governments, and the Justice Department is now pushing the Baltimore Police Department into reform following its investigation.

This doesn't mean that people should go out into the streets and destroy their communities. But as tensions remain high in Charlotte, Baltimore, and other US cities, acknowledging the lingering rage and feelings of neglect that led to the riots as genuine political viewpoints is important not just to understand what would compel someone to burn down or loot local businesses, but also how to prevent such events from happening again in the future.

Riots are caused by genuine anger, not solely opportunists looking to loot

Historians and experts argue that these types of riots aren't solely random acts of violence or people taking advantage of dire circumstances to steal and destroy property. They are, instead, a serious attempt at forcing change after years of neglect by politicians, media, and the general public.

"All of these politicians that get completely overwhelmed and outraged from this level of chaos in their cities during these upheavals seem surprised," Heather Ann Thompson, a historian at the University of Michigan who's studied America's 1960s riots, previously told me. "Yet … the origins of the upheaval are very much in their control."

In the 1960s, despite the victories of the civil rights movement, economic disparities and police abuse against black communities culminated in violent demonstrations across the country. Throughout the decade, people rose up in cities like Los Angeles, Detroit, Philadelphia, and Baltimore.

These riots were, like the current protests in Charlotte, triggered by specific catalysts. The 1968 riots in Baltimore — and across the country — were galvanized by the assassination of Martin Luther King Jr. But they were deeply rooted in discontent with police departments that were predominantly white and neglected and abused black neighborhoods.

"There's a long memory of historical injustice"

"Almost all of the several hundred riots that happened between 1963 and 1970 were sparked by confrontations between African Americans and the police," Thomas Sugrue, a historian at New York University who's also studied the 1960s riots, said. But, he added, "There's a long memory of historical injustice — going back to slave patrols, to police officers enforcing racial segregation and arresting nonviolent protesters, and the commonplace tension, conflict, and harassment directed at African Americans by law enforcement officials."

Similarly, in 1992, South Central Los Angeles rose up in riots that lasted six days, killed more than 60 people, and injured thousands.

The riots were triggered by the acquittal of police officers who were caught on tape beating Rodney King, a black man, after a high-speed chase.

But, Hunt of UCLA explained, the riots were really a culmination of anger in black and Hispanic communities over decades of economic inequality and police abuses in Los Angeles. Previous research found, for example, that high unemployment and poverty in South Central Los Angeles made it a hotbed for violent outbursts. Hunt also said the community was simmering with anger at the time over the recent sentence of Soon Da Ju, a Korean-born shop owner who was sentenced to five years' probation for fatally shooting a black teenager she thought was stealing a bottle of orange juice.

"It was the accumulation of slights and insults and disrespect," Hunt said.

Baltimore and Charlotte faced years of neglect before rising up

More recent riots have also been fueled by years of issues, even if they were seemingly catalyzed by a single event.

The catalyst for the protests and subsequent riots in Baltimore in April 2015 was Freddie Gray's death and questions about why he was arrested and whether the cops who arrested him caused his fatal spinal cord injury. And in Charlotte, the main catalyst was the police shooting of Keith Lamont Scott.

But there were deeper issues, as well. Gray's West Baltimore neighborhood, for example, has languished in poverty: More than half the residents weren't working and one-third of residential buildings were vacant or abandoned, according to a February 2015 report by the Justice Policy Institute and Prison Policy Initiative. At the same time, the city had to pay $5.7 million in settlements to more than 100 people — most of whom were black — since 2011 over allegations that police abused and beat them, according to a September 2014 report by the Baltimore Sun's Mark Puente.

Charlotte, similarly, has long been mired by racially skewed policing and residential segregation. Thompson explained in an op-ed for NBC News:

In short, Charlotte is one of the wealthiest cities in the country, but this prosperity hasn't touched overwhelmingly black West and Northeast Charlotte and it is one of the most heavily policed. And the police don't spend much energy policing — throwing people up against cars on a regular basis to search them for drugs — in overwhelmingly white South Charlotte. And the excessive and aggressive policing of only Charlotte's poorest and blackest neighborhoods leads there, as it does in every other city in the country, to the killing of citizens by the police. It has led there, as it has elsewhere to outrage.

The anger toward these systems, particularly in black communities, extends outside Baltimore and Charlotte. The Black Lives Matter movement took off following the police shooting of Michael Brown, an unarmed black 18-year-old, in Ferguson, Missouri. Since Brown's death, the rallying call of Black Lives Matter has been pushed in protests for several other police killings — of Eric Garner in New York City, Tamir Rice in Cleveland, and Walter Scott in North Charleston, South Carolina. These deaths and many others have fed into the idea in black communities that their own members — or their sons — could be the next victims of police brutality.

An analysis of the available FBI data by Vox's Dara Lind found that US police kill black people at disproportionate rates: Black people accounted for 31 percent of police killing victims in 2012, even though they made up 13 percent of the US population. Although the data is incomplete, since it's based on voluntary reports from police agencies around the country, it highlights the vast disparities in how police use force.

Higher crime in black communities doesn't fully explain the disparities. A 2015 study by researcher Cody Ross found, "There is no relationship between county-level racial bias in police shootings and crime rates (even race-specific crime rates), meaning that the racial bias observed in police shootings in this data set is not explainable as a response to local-level crime rates." That suggests something else — such as, potentially, racial bias — is going on.

But Thompson said it also takes years of neglect, despite peaceful calls for change, for discontent to turn into violence. "Riots never come first," she said. "They only come after a sustained attempt to change whatever is the problem through other means."

In the 1960s, people engaged in nonviolent protests as part of the Civil Rights Movement, filed complaints through the NAACP, complained to media, and threatened litigation, Thompson said.

In Baltimore, locals complained to media, filed lawsuits over police abuse, and, finally, protested peacefully for weeks before the protests turned violent. In Charlotte, black communities have long complained about mistreatment by police — including, previously, the 2013 police shooting of Jonathan Ferrell, an unarmed 24-year-old black man who was shot 10 times and killed by a white police officer after he crashed his car.

It was only when these attempts at drawing attention to systemic problems failed that demonstrators rose up in violence, including in modern-day Baltimore and Charlotte.

"I was one of the ones who started the peaceful protests … the first seven days [after Gray's death], when it was fine and dandy," William Stewart, a West Baltimore resident who didn't participate in the riots, told Jenée Desmond-Harris for Vox. "I walked about 101 miles in peace. But if you protest peacefully, they don't give a shit."

Violent demonstrations can and have spurred change

Social justice riots are often depicted as people senselessly destroying their own communities to no productive means. President Barack Obama, Baltimore Mayor Stephanie Rawlings-Blake, and members of the media all used this type of characterization to describe the riots in Baltimore. It was a widespread sentiment online after the Charlotte protests, too.

But riots can and have led to substantial reforms in the past, indicating that they can be part of a coherent political movement. By drawing attention to some of the real despair in destitute communities, riots can push the public and leaders to initiate real reforms to fix whatever led to the violent rage.

"When you have a major event like this, the power structure has to respond," Hunt of UCLA said. "Some very concrete, material things often come out of these events."

"When you have a major event like this, the power structure has to respond"

The 1960s unrest, for example, led to the Kerner Commission, which reviewed the cause of the uprisings and pushed reforms in local police departments. The changes to police ended up taking various forms: more active hiring of minority police officers, civilian review boards of cases in which police use force, and residency requirements that force officers to live in the communities they police.

"This is one of the greatest ironies. People would say that this kind of level of upheaval in the streets and this kind of chaos in the streets is counterproductive," Thompson said. "The fact of the matter is that it was after every major city in the urban north exploded in the 1960s that we get the first massive probe into what was going on — known as the Kerner Commission."

Sugrue agreed. "It's safe to say some changes would have happened a lot more slowly had there not been disruptive protests," he said.

Similarly, in Los Angeles, the 1992 riots led the Los Angeles Police Department to implement reforms that put more emphasis on community policing and diversity. The reforms appear to have worked, to some extent: Surveys from the Los Angeles Times found approval of the LAPD rose from 40 percent in 1991 to 77 percent in 2009 — although approval among Hispanic and black residents was lower, at 76 percent and 68 percent respectively. It's hard to say, but these types of changes might have prevented more riots over policing issues in Los Angeles.

"It's not perfect — far from that," Hunt said. "But it's better."

But there's always the threat of backlash to riots

Rioting can spur change, but it can also lead to destructive backlash.

In the immediate aftermath, riots can scare away investment and business from riot-torn communities. This is something that remains an issue in West Baltimore, where some buildings are still scarred by the 1968 riots.

In the long term, they can also motivate draconian policy changes that emphasize law and order above all else. The "tough on crime" policies enacted in the 1970s through 1990s are mostly attributed to urban decay brought on by suburbanization, a general rise in crime, and increasing drug use, but Thompson and Sugrue argued that the backlash to the 1960s riots was also partly to blame.

"Riots cut both ways," Sugrue said. "They do give a voice to the voiceless, but they can also lead to consequences that those who are challenging the system don't intend."

The "tough on crime" policies pushed a considerably harsher approach in the criminal justice system, with a goal of deterring crime with the threat of punishment. Police were evaluated far more on how many arrests they carried out, even for petty crimes like loitering. Sentences for many crimes dramatically increased. As a result, levels of incarceration skyrocketed in the US, with black men at far greater risk of being jailed or imprisoned than other segments of the population.

The irony is that many of these "tough on crime" policies led to the current distrust of police in cities like Baltimore, as David Simon, creator of The Wire and former Baltimore crime reporter, explained to the Bill Keller at the Marshall Project:

[I]t's time to make new sergeants or lieutenants, and so you look at the computer and say: Who's doing the most work? And they say, man, this guy had 80 arrests last month, and this other guy's only got one. Who do you think gets made sergeant? And then who trains the next generation of cops in how not to do police work? I've just described for you the culture of the Baltimore police department amid the deluge of the drug war, where actual investigation goes unrewarded and where rounding up bodies for street dealing, drug possession, loitering such — the easiest and most self-evident arrests a cop can make — is nonetheless the path to enlightenment and promotion and some additional pay.

So by viewing riots as criminal acts instead of legitimate political displays of anger at systemic failures, the politicians of the 1970s, '80s, and '90s pushed some policies that actually fostered further anger toward police — even as other, positive reforms were simultaneously spurred by urban uprisings. By misunderstanding the purpose of the riots, public officials made events like them more likely.

"By having done that, these communities are far worse off," Thompson said. "The crisis of police brutality, poverty, exploitation, and black citizens not feeling like full citizens have all gotten much, much worse in 40 years."

Watch: Why recording the police is so important