Why is it illegal to rob a bank?

Is planning a bank robbery a punishable offense?

A, B and C decide to rob D. They forge a plan together. A has to take a pistol with him to discourage the opponent, B is supposed to tie up and overwhelm D and C is supposed to look for valuables in the house.

When the three of them put their plan into action the next day, A rings the bell and when D opens it, A has already drawn his gun and B begins to attack D. All four are in the hallway. B has D in a stranglehold, but fails to tie him up.

Suddenly, wife E appears and starts calling for help. A shoots into the ceiling, but the shot ricochets off and hits E. She is instantly dead. At the same moment C comes back, apparently without prey, but what the others do not see he has found a watch worth 10,000 €.

A, B and C are totally shocked and quickly leave the house.

D is also shocked and panicked. therefore he is afraid that the robbers might return and use violence again. He takes a shotgun and shoots the fleeing man immediately - without shouting a warning or a warning shot. The shot hits C, who immediately collapses and dies.

Regarding my question: I would normally examine C according to §§ 249 I, 250 I No. 1a, No. 2, II No. 1 StGB for serious robbery, but since C was shot by D, the claim is normally lost?

If, however, the main culprit's claim no longer applies, I cannot check A and B for complicity in accordance with Section 25 II.

Do I have to check C incidentally? and if so how does that work exactly?

Many thanks in advance for your help