My guess is the bolt wasn't fully closed and the case head ruptured.
Now, why that occurred is a good question, but one that can not be answered here fully given the evidence.
The AR platform is essentially 2 separate pieces. The lower receiver contains the trigger and hammer and the upper contains the bolt and gas system.
There is no way for the lower to know the condition of the upper. In many guns, there exists a disconnecter that prevents firing when a gun isn't fully closed. No such device exists in the AR platform. It is by the length of the firing pin that should prevent a round from discharging from a bolt that isn't closed, but this is no guarantee. Especially on non-military 'soft' primers.
The likely scenario is that something was preventing the firearm to be loaded properly. You can see this in several attempts to fire by the individual. Rather than taking the time to examine the problem and fix it, he continues to force the rifle to load.
In the final scene, he managed to get the rifle closed enough to allow the hammer to strike the firing pin and the round in the chamber is jammed enough to hold its position and the pin detonates the primer. Since I believe the bolt wasn't fully closed, the expansion of gasses forces the round further into the chamber causing a rupture at the case head. 50,000 psi blows out from the unsecured bolt and blows pieces of the gun apart.
This isn't a failure of the gun, but a failure of the nimrod operating it to ignore the signs of trouble and continue to force the issue. He is lucky that a good scare is all he got for his ignorance.