(CNN) The two scenes played out in recent days in a strikingly similar fashion.
Outside a courthouse in Buffalo, New York, police officers and others gathered last Saturday to applaud and cheer for Officers Aaron Torgalski and Robert McCabe, who were suspended and charged with assault after a video appeared to show them pushing a 75-year-old man during a protest over police brutality. The officers have pleaded not guilty.
Then on Monday, another crowd of officers assembled outside a police union headquarters in Philadelphia, whistling and cheering to support Staff Inspector Joseph Bologna, who faces assault charges after allegedly striking a college student with a metal baton last week at an anti-racism protest. Bologna has surrendered but has yet to be arraigned.
The Buffalo and Philadelphia cases must still be tried in court. But the shows of solidarity from some of their fellow officers raises the question: Why would some officers rally around colleagues who are accused of committing crimes while on duty?
To understand that, policing experts and two former officers say, you have to understand traditional police culture -- and what it takes to chip away at the so-called "blue wall of silence."
Police have long had a strong sense of camaraderie, says Joseph Ested, a former law enforcement officer in Richmond, Virginia, and the author of the book, "Police Brutality Matters."
Go to any police department across the nation, and you'll find that relationships between officers are extremely tight-knit, he said. It's a brotherhood and sisterhood -- and that notion is instilled in cops at the entry level.
"When you first join the police academy, the first thing they tell you is, "This is your family now. We take care of each other. We look out for each other. We don't arrest each other. We'll always extend that benefit to take care of each other,'" Ested said.
That notion only gets stronger when officers leave the academy, he said. When police are out in the field, they have to rely on one another -- sometimes in dangerous situations. So, regardless of circumstances, they have each other's backs, he added.
Sometimes that loyalty might be displayed in private, through words exchanged at the station between shifts or through what's dubbed the "blue wall of silence," when an officer keeps quiet about another's misconduct, said David Thomas, a professor of forensic studies and criminal justice at Florida Gulf Coast University and a retired police officer.
There's also a longstanding tradition of public solidarity. When an officer is wounded, colleagues gather for vigils outside the hospital. When an officer dies, law enforcement personnel come together en masse at the funeral. When an officer is accused of a crime, some fellow police often line the benches in the courtroom.
"They are there to support the officer," Thomas said, of the mindset behind that solidarity. "They back the blue no matter what."
Certainly not all officers ascribe to those notions or participate in unconditional shows of support, he added.
Subcultures within individual departments can vary widely, and leaders at some of the nation's largest law enforcement agencies have signaled that excessive force or other misconduct won't be tolerated.
A group of 14 sworn officers in Minneapolis this week released an open letter saying they condemn the actions of their former colleague, Derek Chauvin, who while in uniform on Memorial Day pressed his knee into the neck of George Floyd, who died a short time later. Chauvin has been fired and charged with second-degree murder, and three other officers at the scene also have been fired and charged with crimes. None of the four officers have entered a plea.
Those who signed the letter wrote, "Derek Chauvin failed as a human and stripped George Floyd of his dignity and life. This is not who we are."
Police chiefs in Atlanta, Los Angeles, Houston and St. Paul have also disavowed the officers' actions against Floyd. In Florida, the Brevard County Sheriff's Office suspended a lieutenant who is also the president of the county's fraternal order of police after he suggested in a social media post that police from departments accused of brutality should work in Florida.
But even when chiefs set a different tone, they can be limited in their capacity to affect how street-level officers do their work, write Sarah J. McLean and Robert E. Worden in "Mirage of Police Reform: Procedural Justice and Police Legitimacy."
Frontline supervisors can more directly influence officers' behavior, but the extent to which that happens depends on that supervisor's own approach, they say.
"Some police subcultures will be receptive to a reform proposed by management, such as community policing, and others will tend to resist, based on the compatibility of the reform (as officers make sense of it) with officers' own occupational values and attitudes," the authors write.
And then there is the power of police unions. Police union contracts can make it difficult to remove officers flagged for misconduct, despite a department chief's intentions.
Many jurisdictions have duty to intervene policies on the books, which require officers to step in when colleagues use excessive force and report those incidents to a supervisor.
But the culture of policing can work against such policies in practice, said William Terrill, professor of criminology and criminal justice at Arizona State University.
"You're asking officers to intervene with one of their colleagues, and it can be perceived as, 'You're infringing on my authority,'" he said.
That's especially potent given the hierarchy that exists in policing. The chain of command can make it difficult for younger or more junior officers to question or speak out against someone of a higher rank, especially when there appear to be gray areas in the situation.
The attorney for Thomas Lane, one of the Minneapolis police officers involved in the arrest that led to Floyd's death, is making a case to this effect.
Lane had been on the force for four days at the time of the incident, lawyer Earl Gray told CNN. As Chauvin pressed his knee into Floyd's neck, Lane suggested more than once that they roll Floyd onto his side, Gray said.
"I am worried about excited delirium or whatever," Lane said, according to authorities' probable cause statement. "That's why we have him on his stomach," Chauvin replied, according to the document.
If an officer does question a decision or violate the "blue wall of silence," they can be perceived as being disloyal, Terrill said. And that, in turn, can lead to them being shunned or excluded by their peers.
"The last thing you want as an officer is to need help and look around and no one's showing up," Terrill said.
To avoid being shunned, an officer may decide that it's worthwhile to bend the rules, Terrill said. They may feign ignorance when questioned about a partner's behavior during a police stop. Or they may remain silent when a colleague acts inappropriately on the scene.
Supporting a fellow police officer who may have acted illegally doesn't send a positive message to the public. But those who do so may be more concerned about supporting a fellow officer in a tense moment than about the public's perception, Thomas said.
"It is about a brother or sister in blue that is in trouble," he said. "And so, that support is more important because to them, the public has already vilified them."
That attitude is part of an "us vs. them" mindset that exists in some police subcultures, he said.
Policing is a unique profession, with pressures and risks unlike almost any other job. Cops who work at the patrol level face a high degree of uncertainty in many calls they respond to, some of which could pose a deadly threat.
Many officers believe the public -- even their own families -- don't fully understand the nature of what they do, said Thomas, referring in part to what he's been told in providing counseling services to police. Some also feel that they're viewed negatively because of their authority to make arrests, he said.
"Who else carries a gun off duty? Who else is expected to intervene in something that happens when you're in the supermarket or corner store?" he said. "There's no other job like that, and that responsibility is huge."
Being an officer becomes a part of one's identity, and it can be difficult for police to separate that identity from everyday life, said Thomas. That can contribute to the social isolation experienced by cops in some communities, leading those officers to socialize only with other officers. And it helps explain why law enforcement personnel are so loyal to each other, Thomas added.
The "us vs. them" mentality comes from a "war on crime" mindset that exists in some departments, Terrill said.
Terrill, who studies police behavior and culture, said he teaches many aspiring officers in his classes. Often, even those who say they want to enter the profession to help their communities define that as "catching the bad guy," he said.
Then, when recruits enter the academy, there's a greater emphasis on teaching officers how to handle dangerous situations than on community relations, which can lead street-level officers to view the public with suspicion. That approach is what's known as a warrior mindset, Terrill said, in contrast to the guardian mindset emphasizing social service that has gained traction in recent years.
"Cops often see themselves as the good guys," he said. "The bad guys are the people that are violating the law. And (police) are just the thin blue line that creates that safety for the law-abiding citizens."
But the suspicion doesn't just extend to the public. Officers who work on the front lines might believe that they aren't guaranteed the support of their managers if they end up having to employ force in a situation, Terrill said. So, they feel that all they have is each other.
Police departments can address these issues of culture by reinforcing their existing "duty to intervene" policies and assigning officers with varying cultural attitudes to work together on shifts, Terrill said.
The #8CantWait campaign, a policing reform initiative by the advocacy group Campaign Zero, includes the duty to intervene as one of its eight immediate reforms departments can take now. And in recent days, some local governments and police departments have proposed or reinforced policies that address some of these issues.
The police chief in Chattanooga, Tennessee, issued a memo highlighting a new duty to intervene policy. The Pittsburgh City Council proposed a bill that would require police officers and employees to step in if a colleague uses inappropriate force or acts unlawfully.
Other advocacy organizations have also proposed reforms to police culture including training officers to be guardians rather than warriors and ensuring that officers understand and live in the communities they serve. The Washington State Criminal Justice Training Commission has implemented the guardian approach in its police training since 2012, and departments across the nation have also worked to reform police culture through crisis intervention training, better oversight and community policing.
But many of the notions of police culture are deeply ingrained, and undoing the ones that can hinder fair policing may be a long and slow process.