The narrative of "Dog Day Afternoon" is a slow-motion tragedy, where every decision Sonny makes digs him deeper into a hole from which there is no escape. The central twist, revealed midway through the film, is the true motivation for the robbery: Sonny needs money to pay for his lover Leon's gender-affirming surgery. This re-contextualizes the entire film, shifting it from a standard heist movie into a desperate love story. The poignant phone call between Sonny and Leon, where Leon reveals he is in a psychiatric hospital after a suicide attempt, adds another layer of tragedy, showing that Sonny's grand, reckless gesture is unwanted and is only causing more pain.
The development of a quasi-Stockholm Syndrome between Sonny and the hostages is a key element. He never intends to hurt them, and his genuine concern for their welfare (like letting one employee go to the bathroom) fosters an unusual bond. They cease to see him purely as a monster, and instead as a complicated, overwhelmed man. This humanization makes the film's violent climax all the more shocking.
The ending is brutally swift and inevitable. Despite all the negotiations and Sonny's elaborate performance for the media, the authorities are simply waiting for their moment. At the airport, as Sonny believes he is on the verge of escape, FBI Agent Murphy shoots Sal in the head, killing him instantly. Sonny is immediately arrested. There is no glorious escape or final standoff. The system he railed against extinguishes the threat with cold efficiency. The final shots of Sonny's devastated face as he watches Sal's body being taken away reveal the complete and utter failure of his plan. The closing text reveals that Sonny was sentenced to 20 years, and that Leon eventually had her surgery, a bittersweet and hollow victory that cost Sal his life and Sonny his freedom.