well, he's a duty officer. they're bound by law to have their arms ready for action at all times.
for the purpose of demonstrations like this, once he in in the building, they usually take the mag out and clear the chamber. this idiot apparently didn't remember that semi-auto handguns still have one bullet left in them after you take the mag out.
something similar happened at a party on america.
this guy was playing with his guns with his guests, and he took his beretta 92, racked the slide, then took the mag out, and, as a joke put it to his head.
his friends told him to stop, but he didn't listen and splattered his brains against the wall. he won a Darwin award.