Westerns may have started as clean-cut fables of good versus evil, but they certainly didn't stay that way.
Considering that the western genre essentially remained a prominently successful genre of filmmaking for nearly sixty years, it was inevitable that films would eventually begin to offer meta-commentary on it.
The Searchers, for instance, is a 1956 film directed by the great John Ford and starring John Wayne. Yet, instead of simply reusing the mould of previous Wayne characters or archetypes, Ford casts him as Ethan Edwards. Edwards is a troubled hero, scarred by his time spent in the war and doomed to spend the rest of his life living with the horrors he's seen. He's still a hero, but certainly not the white-hat wearing do-gooders of the previous decades.
Similarly, later films such as Sergio Leone's Man With No Name trilogy would go on to cast frequent western star Clint Eastwood in a similarly troubled role. This kind of archetype became a new norm for the genre in its later years and no other genre has ever been able to do it quite as well.