In act one, scene two of Accidental Death of an Anarchist by Dario Fo, the truth about the death of the anarchist is revealed: he committed suicide when the police told him that they had proof of his involvement in planting bombs in the train station.
Back in the police station, the madman (the maniac) is a conman who is originally arrested for impersonating a psychiatrist. However, upon his release from the police station (he was driving the constable crazy with his talking) he decides to stay in the police station so that he can impersonate the judge that is expected to arrive at the station later on.
The madman is good at what he does and has a great way with words. For this reason, he is able to manipulate the interrogation he has decided to pose to the superintendent, and achieves a confession from the superintendent who reveals that the police never had and still does not have any proof to connect the anarchist to the planting of the bombs in the train station.
Therefore, it is the negligence of the police and the psychological games they play with the anarchist that ultimately causes the latter to jump out of the window for fear of losing his job and ruining his life.
The maniac serves as the comic relief in the play, but particularly in this scene which contains information that is quite tragic. Acting as the judge, the maniac invites the superintendent and the constable to jump out of the window and kill themselves too since they caused the death of an innocent man.
Rather than admitting their negligence, the superintendent and the officer decide to come up with a few fake stories to exonerate themselves from the part they played in the anarchist's suicide. The story that they come up with is so ridiculous that the madman says in his dark humor that the story deserves to end with a song: the anarchist song no less.
MANIAC: Doesn't it make sense? Having created such a cosy atmosphere what else would you do but engage yourselves in four part harmony.
He says these words as a way to add dark humor to the scene, and to add sarcasm to the situation. The superintendent and the officer come up with a story that makes them so kind and caring toward the anarchist that even the maniac is amazed by it, therefore, a song is deserving as a way to close the "scene."
The really funny part is that they actually sing it ,and there is a full chorus
in that scene which, in a live presentation, would make that particular scene look all the more ironically humorous.