During the 1920s and 1930s, a part of the U.S. public rooted for gun-toting, mythologized bank robbers like Bonnie and Clyde, John Dillinger, and Pretty Boy Floyd. But the fantasies were often tempered by reports of guards, police, and innocent bystanders injured and killed in the frequent shoot-outs.
It took a while, but eventually law enforcement caught up with the criminals, either taking them into custody or killing them. Certainly, over time, banks changed how they do business, making them less attractive to robbers, but the biggest disincentive was simply the fact that police got better at their jobs and criminals were successfully hunted. Even today, it's no miscorrelation that American prison populations are at an all-time high while crime is at an all-time low.