The problem must be how the gangstar obtained explosives inside the prison. It means inspections of the prison were so easy that explosives were carried into the prison.
Otherwise, there were materials to synthesize explosives. In that case, those who have studied chemistry would be advantageous to causing the accident.
Oh, I won't be suitable for thinking about such a thing. For me, it is nothing but torture to see chemical formula.