Many of those in the scene, including Madeleine Lebeau, who led the singing, had escaped the Nazis.
Here's an article that explains it all from the National Endowment of the Humanites. Read it before Trump scrubs it.
In Casablanca, Madeleine Lebeau Became Forever the Face of French Resistance
75 years after its premiere, Casablanca still moves us.

By Noah Isenberg
HUMANITIES, Winter 2017, Volume 38, Number 1
When Casablanca premiered on Thanksgiving Day 1942, in the middle of the war and just two weeks after the city of Casablanca itself had surrendered to General Pattons troops, even the most optimistic of Tinseltown dreamers could hardly have predicted that it would go on to become perhaps the most beloved of all Hollywood movies. And yet this picture that makes the spine tingle and the heart take a leap, as the New York Times critic Bosley Crowther wrote at the time, would go on not only to win Oscars for Best Picture, Best Director, and Best Adapted Screenplay, but to enjoy more revival screenings than any other film in the history of cinema. Seventy years after the films release, the Academy of Motion Pictures selected Casablanca to inaugurate its public Oscar Outdoors series at its new open-air theater in the heart of Hollywood. As Umberto Eco once said, Casablanca is not one movie; it is movies.
Like so many other fans, I was reminded of the movies indelible place in our cultural lexicon in the spring of 2016, when news arrived that cast member Madeleine Lebeau had passed away in a small Spanish town on the Costa del Sol. Not yet 20 when the film was made, the French-born Lebeau turned in a spirited performance as Yvonne, the young woman who gets snubbed by Humphrey Bogart in the films first act, only to return defiantly to Ricks Café Américainshifting her allegiances with the speed of a Vichy opportuniston the arm of a Nazi officer. She ultimately reveals her true colors by singing a vigorous rendition of La Marseillaise during the pivotal scene in which the café patrons sing the French national anthem with increasing fervor to drown out the competing Nazi chorus of Die Wacht am Rhein. Tears stream down her trembling cheeks, shot in luminous close-up, as she cries out Vive la France! and Vive la démocratie!
I think it was the most moving patriotic scene ever played in any picture, remarked Russian-born actor Leonid Kinskey, who played Sascha the barman, three decades after the film was released. Without Yvonne, without her inimitable voice and her tears, the scene is unthinkable.
As it turns out, Lebeau herself had fled Nazi-engulfed Europe with her Jewish husband, Marcel Dalio, who plays Emil the croupier at Ricks Café and who was already famous in Europe for his winning performances in Jean Renoirs La Grande Illusion (Grand Illusion, 1937) and La Règle du jeu (Rules of the Game, 1939). In an ugly turn, close-ups of Dalio, taken from those films, were appropriated on anti-Semitic Vichy propaganda placards. Shortly before the German invasion of Paris, Dalio and Lebeau made their way to Lisbon, that prized destination for languishing refugees in Casablanca, and from there, using forged visas, secured passage on the S.S. Quanza, a Portuguese ship carrying hundreds of émigrés to the New World. Landing in Mexico, they were able to get temporary Canadian visas and, with them in hand, crossed the border to California and eventually to the back lot at Warner Bros.