The film follows in the tradition of films such as Dr Strangelove By Stanley Kubrick.
In a similar way there was a realisation that the subject matter is so dark, so frightening that the only way to present it is with a vein of dark humour, especially given the complicated financial elements.
To quote the director Adam McKay
"I feel if you do this movie like, say, 'The Insider' — which I think is a great movie — you wouldn't be doing this story justice,"
additionally you can see more here:
But McKay acknowledges he didn't write the script intending to get laughs. It came from the material in Lewis' book that is so outlandish you can only help but laugh, which McKay did while reading it in one sitting in 2010.