As you might have noticed, the reenactments that Anwar does with his men get more and more surreal throughout the film. Starting from gangster movies and westerns the scenes evolve into visions of ghosts haunting Anwar, over the weird cross-dressed Herman cutting his throat and feeding him with the flesh of his victims upto to that "Born Free" song at the end where his victims ultimately even thank Anwar for sending them into heaven.
We can approach this from multiple perspectives that all make sense in the way of explaining why those song, dance and cross dressing sequences seem so rather weird. Most of those aspects are reinfocred by director Joshua Oppenheimer himself in an interesting interview with Collider.
Now first of all, from Anwar watching the finally produced movie at the end, we already see that this is largely chronological (as also confirmed by Oppenheimer in his interview). So looking at the film within the film, this marks on the one hand a, so to say, coherent plot structure in the actual reenactment movie, which goes from the very substantial murders, over Anwar being haunted by his victims and his guilt in his nightmares, upto his ultimate redemption from his crimes in heaven by the victims themselves. So the reenactments are reaching into less and less substantial and more and more abstract territory from a mere story-wise perspective.
But in the same way, the movie also chronicles Anwar's personal treatment of what he did, something he didn't have to face for 40 years, and his way towards remorse. And in this same way the ways in which he tries to come to terms with what he's done get more and more surreal, too. From heroic and cool depictions inspired by the gangster films he took as ideals during the killings itself, over more self-reflecting scenes of the victims coming for him, to a final last try to let himself be absolved from his deeds in heaven and revive the heroic spirit of what it means to be a "preman", a free man, yet again. You could say this reality shift is because he has more and more difficulties to actually process his deeds on a real and substantial level and is trying to add more and more surrealism to the scenes in order to not face his actual guilt, in the same way he always fled himself into the movies he took as inspiration for his deeds.
It’s ironic that cinema for Anwar, at the time of the killing, was a way for distancing himself from the act of killing. [...] I felt that his pain was close to the surface there, so I showed him the footage back to see if he would recognize the mirror of what he’s done in the footage, and I think he does. He looks very disturbed, almost distraught, watching it, but he dared not say what was wrong, because they would have to admit what he did was wrong. Then he proposes a new improvement. He lied to himself and to me about what’s bothering him, and he just wants some aesthetic and integral improvement, and he begins to embellish. So with each sense of embellishment, which is culminating in this surreal genre inspired dramatizations, he’s running away from the pain of what he did, just as he used cinema to do so at the time of the killing...
So those scenes are in a way surreal because the reenactment movie itself touches more and more abstract topics but also because Anwar tries to run away from his real guilt into more and more surreal distortions. And on the other hand the increasing absurdity of the scenes also adds to the surreal farce that the movie ultimately is, something that is so much "realer than reality" and maybe only bearable through utter absurdity, for us as much as for Anwar.
But Oppenheimer does say even more about the song and dance scenes specifically, both the heaven scene at the end as well as the fish sculpture at the beginning (which is a little less connected to the overall story than the heaven scene), again reinforcing the overall notions of handling reality by surrealistic distortion that the whole movie ultimately consists of:
Going back to this note about the surreal, now the surrealness definitely comes through in his nightmares, but for most of the scenes there is something grounded, something remembered, but the one scene where they’re doing “Born Free,” how did that come about? ‘Cause that is obviously the most surreal scene in the film.
OPPENHEIMER: Well, there are two reasons for it, one of which we see, which is “Born Free,” and it kinda came up where we see it. Anwar plays the victim; he wanted to cleanse himself from the ghosts that were trying to haunt him, and he proposed that we shoot this cleansing scene at this waterfall, which evolved into a full blown vision of his redemption in heaven. [...] So the scene came chronologically right where we see it in the film, and it served the function for Anwar that it appeared to, which is kind of a desperate, last ditch attempt to deny the meaning of what he’d done. The meaning was finally dawning on him as he got to play his own victim. There’s also the scene with the fish. That’s a scene, another musical number that we shot. It’s a former seafood restaurant that Anwar chose as a location for a musical number based on his favorite song, “Is That All There Is?” by Peggy Lee, and we shot the musical scene there, and it was amazing and surreal and strange. But in the end, I still have these moments, these artifacts from the scene that were so surreal, that were poetic embodiments about what the whole film is about. Mainly we get lost in our fantasies; just this destructive effect — that I had a choice: do I used a musical number or do I use these moments from shooting, and when you have such powerful, beautiful material. I couldn’t do both. I know I couldn’t do both, so I had to choose, and of course I chose the poetic embodiments of what the whole film’s about, which are climaxes in surrealness rather than the musical number itself.