From the start of cinema, the gangster has been a mainstay of American cinema, and this video essay from Fandor examines how filmmakers use American myths and psychology to fashion their outlaws into heroes. The video below is an excellent place to start if you're thinking about crafting a perfect anti-hero for your script. These characters may rise through crime and violence, but they become people that the audience can root for, and ultimately identify with. 

Here are three ways filmmakers have made movie gangsters into more than just criminals, even if they are ultimately tragic heroes:  

1. Their humble beginnings 

The gangster character is an American striver. They are hustlers, to be sure, but they rise from humble beginnings to ascend the social ladder, which can be confusing to navigate. 

2. Their "honesty"

In the massively influential and groundbreaking Bonnie and Clyde from 1967, the criminals are noted for their scrupulous honesty (at least when it comes to each other, and, here, the common people.) Note how when they rob a bank, the two don't rob from the poor to give to the rich, an act that would make them villains; rather, they rob from the rich to give to themselves, allowing the common folk to keep what's theirs.

3. Their tragic deaths

In a gangster film, we are never permitted to see the criminal triumphant. This excellent essay argues, among other things, that the gangster is killed "because he is an individual. The gangster's whole life is an draw himself out of the crowd." This is both irony and the precondition of his downfall. With death, the larger-than-life figure is returned to the crowd by a bullet. In the classic Little Caesar, Edward G. Robinson speaks of himself in the third person "because what has been brought low is...the individual with a name, the gangster," or the kid with humble beginnings.

In the final analysis, audiences identify with gangsters because they try to pull themselves up in a dog-eat-dog society, and, ultimately, fail. In other words:  "The effect of the gangster film is to embody this dilemma in the person of the gangster and resolve it by his death. The dilemma is resolved because it is his death, not ours."

By living vicariously through these criminals, deep psychological needs of the audience are addressed—needs that, were the gangster to end the film in triumph, would almost certainly make the film unsuccessful.

Source: Fandor Keyframe