During the film’s climax, riots break out all over Gotham after Arthur murders Murray Franklin on live TV. While Arthur is arrested and bundled into a police car (which later crashes, allowing Arthur to be pulled free), rioters shoot Thomas and Martha Wayne in an alleyway but spare the couple’s young son - Bruce Wayne. In
Joker’s final scene, which takes place in Arkham State Hospital,
Arthur remembers the Waynes being murdered - something that he couldn’t have witnessed from his position inside and then atop the police car. For this reason, the events of the film almost certainly take place inside Arthur’s head.