Even in the early days of film history, the audience appetite for new content was voracious. A film distributer would often have to deliver to an exhibitor over a hundred films a year to keep the theaters fresh. This constant demand for new material led to the necessity of imitation. As stories were reworked and reshot, what began to emerge by the end of the 1910s, and certainly was noticeably present by the mid 1920s, was the use of conventions as a kind of short-hand for the information that was pushing a story along. The audience had seen hundreds of Westerns and no longer needed the same extensive setup for the showdown. The convention was created where, when two men face each other on the street and menacingly look at one another, you can be sure bullets will fly. These conventions included anything from the good guy in a white hat and the bad guy in a black hat, to the actual edited construction of a film sequence.
While western films are an easy example, many other genres developed equally complex sets of conventions. The eery music in slasher films, the loss of the girl due to dishonesty in the romantic comedy film, and the spontaneous burst into song in the musical film all are some of the more explicit conventions that we no longer consider.
As genres pass the point of maturity, they often go into a stage of deconstruction. With respect to the Western: Little Big Man realigned the conventions in a politically correct way (or more to the point, reversed the cowboy and Indian relationship), Blazing Saddles turned the conventions into humor, and Unforgiven reversed every convention for the sake of tragedy.
Much debate continues about what makes a genre and what doesn't, as well as the way genres are constructed or deconstructed.
(All of this barely touches the surface.)