It is said (in other sources) that he illegally took the semi-automatic gun (! you can´t buy that in Germany!) from the armory of his unit. Depending on the rank and influence of this soldier, this doesn´t sound strange.
That’s possible to do, even for a low-ranking Soldier. It depends on a multitude of factors, the most prominent one being how closely the company armorer tracks his arms room inventory before closing up for the day. Obviously that commander has some ‘splainin’ to do.