I don't know about you, but I have always had a fascination for the westerns in cinema. They have taken many forms over several decades, but didn't really stray from a certain formula until the 1960s.
Some basic plots of a western:
a) cowboys vs "Indians", a plot device that has thankfully been disposed of decades ago due to the oversimplification of the hero cowboys and the sometimes good, sometimes "evil" "Indians".
b) evil bandits/hired thugs threaten the sheriff or marshall to get out of town, leading up to a showdown
c) a wagon train encounters troubles on its journey west for a new life
Lots of combinations of these basic ideas were used over and over between the 1920s and the 1950s, some employing the use of singing cowboys in the form of Gene Autry, who found later success singing about reindeer, and Roy Rogers. In fact the basic formulas worked well in the beginning as they were cheap to produce and theaters were cheap to get into during the Depression and World War 2. Along with the wacky antics of the 3 Stooges, Marx Brothers, and Laurel &Hardy, westerns served to cheer up an otherwise worried and depressed nation.
When television was turning into a real thing that was here to stay, western TV shows such as "Gunsmoke" and "The Lone Ranger" jumped from radio to the small screen along with countless others and were a major staple of 1950s television.
I will say this for "Gunsmoke": it grayed the lines between the good guys and the bad guys fairly often as the show approached its last years. "Bonanza" did that occasionally, but not as successfully.
Here's the thing, though. Westerns were put out for pure ENTERTAINMENT. They weren't meant to be a moral lesson. You watched the good guys shoot the bad guys with no real special effects blood spewing out, and you couldn't wait to catch the next movie where the same actors playing villains would get shot again. Nobody took those movies or early TV shows seriously.
I am still amused by a later Brady Bunch episode where Bobby idolizes Jesse James. It amuses me because he's old enough to have a clue if he did any real reading, and as there was no social media or even internet to conveniently skew facts a la Alex Jones, the episode is ludicrous...but then the whole series is really if one watches it on MeTV on the weekends. But I digress...
Let's come to the mid 1960s where an Italian filmmaker named Sergio Leone decided to take this oversimplified good guy vs bad guy genre and give it a rotini twist. He created a character generally known as 'the man with no name', played by Clint Eastwood, one of 3 American actors Leone used for a classic trilogy of films: A Fistful of Dollars, For a Few Dollars More, and The Good, the Bad, and the Ugly. Eastwood's character was not so much a hero, but rather the classic definition of an anti-hero: a character you know is the protagonist, but can be brutal, opportunistic, and plain old selfish...a far cry from your typical John Wayne flick. Leone made another western later called Once Upon a Time in the West in 1968, a movie featuring more American actors. I just caught this one today and found myself laughing whenever Jason Robards spoke since he was the best character, much like Tuco in Good/Bad/Ugly. Henry Fonda played the villain while Charles Bronson played a quiet hero (in other words, Bronson playing Bronson).
Clint Eastwood would go on to not only star in but also direct other movies which included westerns. He continued in the rotini twist of the classic formula often, most notably in High Plains Drifter (1973) and The Outlaw Josey Wales (1976). In Drifter, he is a vengeful spirit who is sometimes hard to like but then so are the townfolk who betrayed his former human self, so there is a balance. In Wales, one gets a rare favorable view of the Confederacy and the cruelty of the Union in post-Civil War America.
Sam Peckinpah really put on the violent edge on the western genre with his films, particularly The Wild Bunch and Pat Garrett & Billy the Kid. The lines of good and bad really blur in the latter. In fact, there is that sense in more modern crime films, not just westerns, that one does not necessarily want to know all that the side of justice does to nail or destroy the evil-doers in the world, and that line between right and wrong gets more and more blurred with each new take.
And with each new take we see more blood and gratuitous violence because, well, in many ways that's how things really happened. The west was a violent place for a long time with fights for land, power, and money...often all three. If we keep burying our heads in the sand a pretend it was all for the good of the nation, we haven't learned much about human nature in the past almost 200 years, and are likely doomed to dreary rehashings of violent history over and over.