A Psychological Question about the Film Casablanca

Humphrey Bogart in The Petrified Forest film trailerfrom the 1936 film Petrified Forest (photo in the public domain)

My question is: Why was Humphrey Bogart chosen to play Rick in the film, Casablanca? There must have been commercial reasons involved in the producer, Hal Wallis' choice of Bogart, but, as a psychologist, I can not help but search for deeper reasons he might have had. Why was Humphrey Bogart chosen, a man who was known for his gangster roles — such as Duke Mantee in the Petrified Forest (see above photo) and Roy "Mad Dog" Earl in High Sierra? When movie goers of the day thought of Bogart, they thought of a desperate, selfish killer, but in Casablanca his role was to inspire men to leave home and go to war. Bogart seems about the least likely choice for this kind of role.

Each reader will have his or her own answer to this question. My goal is to present the question, and, in what follows, to express a few psychological observations on the subject.